Salome HOME
93b89e26f4ae74d1b512dd4add3aeb87fb2405c6
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / dto / StepDTO.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   14.11.2012
6  * @author         $Author$
7  * @version        $Revision$
8  * @copyright      OPEN CASCADE 2012
9  *****************************************************************************/
10
11 package org.splat.service.dto;
12
13 import java.util.ArrayList;
14 import java.util.List;
15
16 /**
17  * Study activity (step) DTO. This is a container of step documents.
18  */
19 public class StepDTO {
20         /**
21          * The step's key name.
22          */
23         private String _key;
24         /**
25          * The sequential number of the step.
26          */
27         private int _number;
28         /**
29          * Executable module for this step.
30          */
31         private String _module;
32         /**
33          * Documents of the step.
34          */
35         private List<DocumentDTO> _docs = new ArrayList<DocumentDTO>();
36
37         /**
38          * Get the docs.
39          * 
40          * @return the docs
41          */
42         public List<DocumentDTO> getDocs() {
43                 return _docs;
44         }
45
46         /**
47          * Set the docs.
48          * 
49          * @param docs
50          *            the docs to set
51          */
52         public void setDocs(final List<DocumentDTO> docs) {
53                 _docs = docs;
54         }
55
56         /**
57          * Add a document DTO to the step DTO.
58          * 
59          * @param index
60          *            the document persistent id
61          * @param title
62          *            the document title
63          * @return the added document DTO
64          */
65         public DocumentDTO addDoc(final long index, final String title) {
66                 DocumentDTO doc = new DocumentDTO(index, title);
67                 _docs.add(doc);
68                 return doc;
69         }
70
71         /**
72          * Get the key.
73          * @return the key
74          */
75         public String getKey() {
76                 return _key;
77         }
78
79         /**
80          * Set the key.
81          * @param key the key to set
82          */
83         public void setKey(final String key) {
84                 _key = key;
85         }
86
87         /**
88          * Get the number.
89          * @return the number
90          */
91         public int getNumber() {
92                 return _number;
93         }
94
95         /**
96          * Set the number.
97          * @param number the number to set
98          */
99         public void setNumber(final int number) {
100                 _number = number;
101         }
102
103         /**
104          * Get the module.
105          * @return the module
106          */
107         public String getModule() {
108                 return _module;
109         }
110
111         /**
112          * Set the module.
113          * @param module the module to set
114          */
115         public void setModule(final String module) {
116                 _module = module;
117         }
118 }