View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.core.proposal.dto;
17  
18  import java.io.Serializable;
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.HashMap;
22  import java.util.List;
23  import java.util.Map;
24  
25  import javax.xml.bind.annotation.XmlAccessType;
26  import javax.xml.bind.annotation.XmlAccessorType;
27  import javax.xml.bind.annotation.XmlAttribute;
28  import javax.xml.bind.annotation.XmlElement;
29  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
30  
31  import org.kuali.student.common.dto.HasAttributes;
32  import org.kuali.student.common.dto.HasTypeState;
33  import org.kuali.student.common.dto.Idable;
34  import org.kuali.student.common.dto.MetaInfo;
35  import org.kuali.student.core.ws.binding.JaxbAttributeMapListAdapter;
36  
37  /**
38   * Detailed information about a proposal.
39   *
40   * @Author KSContractMojo
41   * @Author Neerav Agrawal
42   * @Since Thu May 28 10:25:28 EDT 2009
43   * @See <a href="https://test.kuali.org/confluence/display/KULSTU/proposalInfo+Structure">ProposalInfo</>
44   *
45   */
46  @XmlAccessorType(XmlAccessType.FIELD)
47  public class ProposalInfo implements Serializable, Idable, HasTypeState, HasAttributes {
48  
49      private static final long serialVersionUID = 1L;
50  
51      @XmlElement
52      private String name;
53  
54      @XmlElement
55      private List<String> proposerPerson;
56  
57      @XmlElement
58      private List<String> proposerOrg;
59  
60      @XmlElement
61      private String proposalReferenceType;
62  
63      @XmlElement
64      private List<String> proposalReference;
65  
66      @XmlElement
67      private String rationale;
68  
69      @XmlElement
70      private String detailDesc;
71  
72      @XmlElement
73      private Date effectiveDate;
74  
75      @XmlElement
76      private Date expirationDate;
77      
78      @XmlElement
79      private String workflowId;
80  
81      @XmlElement
82      @XmlJavaTypeAdapter(JaxbAttributeMapListAdapter.class)
83      private Map<String, String> attributes;
84  
85      @XmlElement
86      private MetaInfo metaInfo;
87  
88      @XmlAttribute
89      private String type;
90  
91      @XmlAttribute
92      private String state;
93  
94      @XmlAttribute
95      private String id;
96  
97      /**
98       * The name or title of the proposal. Any finite sequence of characters with letters, numerals, symbols and punctuation marks. The length can be any natural number between zero or any positive integer.
99       */
100     public String getName() {
101         return name;
102     }
103 
104     public void setName(String name) {
105         this.name = name;
106     }
107 
108     /**
109      * List of person identifiers. Structure should contain a proposerPerson OR a proposerOrg.
110      */
111     public List<String> getProposerPerson() {
112         if (proposerPerson == null) {
113             proposerPerson = new ArrayList<String>(0);
114         }
115         return proposerPerson;
116     }
117 
118     public void setProposerPerson(List<String> proposerPerson) {
119         this.proposerPerson = proposerPerson;
120     }
121 
122     /**
123      * List of organization identifiers. Structure should contain a proposerPerson OR a proposerOrg
124      */
125     public List<String> getProposerOrg() {
126         if (proposerOrg == null) {
127             proposerOrg = new ArrayList<String>(0);
128         }
129         return proposerOrg;
130     }
131 
132     public void setProposerOrg(List<String> proposerOrg) {
133         this.proposerOrg = proposerOrg;
134     }
135 
136     /**
137      * Unique identifier for a reference type.
138      */
139     public String getProposalReferenceType() {
140         return proposalReferenceType;
141     }
142 
143     public void setProposalReferenceType(String proposalReferenceType) {
144         this.proposalReferenceType = proposalReferenceType;
145     }
146 
147     /**
148      * List of reference identifiers.
149      */
150     public List<String> getProposalReference() {
151         if (proposalReference == null) {
152             proposalReference = new ArrayList<String>(0);
153         }
154         return proposalReference;
155     }
156 
157     public void setProposalReference(List<String> proposalReference) {
158         this.proposalReference = proposalReference;
159     }
160 
161     /**
162      * Brief explanation of the reason for the proposal
163      */
164     public String getRationale() {
165         return rationale;
166     }
167 
168     public void setRationale(String rationale) {
169         this.rationale = rationale;
170     }
171 
172     /**
173      * Detailed description of the proposed changes.
174      */
175     public String getDetailDesc() {
176         return detailDesc;
177     }
178 
179     public void setDetailDesc(String detailDesc) {
180         this.detailDesc = detailDesc;
181     }
182 
183     /**
184      * Date and time that this proposal became effective. This is a similar concept to the effective date on enumerated values. When an expiration date has been specified, this field must be less than or equal to the expiration date.
185      */
186     public Date getEffectiveDate() {
187         return effectiveDate;
188     }
189 
190     public void setEffectiveDate(Date effectiveDate) {
191         this.effectiveDate = effectiveDate;
192     }
193 
194     /**
195      * Date and time that this proposal expires. This is a similar concept to the expiration date on enumerated values. If specified, this should be greater than or equal to the effective date. If this field is not specified, then no expiration date has been currently defined and should automatically be considered greater than the effective date.
196      */
197     public Date getExpirationDate() {
198         return expirationDate;
199     }
200 
201     public void setExpirationDate(Date expirationDate) {
202         this.expirationDate = expirationDate;
203     }
204 
205     /**
206      * List of key/value pairs, typically used for dynamic attributes.
207      */
208     public Map<String, String> getAttributes() {
209         if (attributes == null) {
210             attributes = new HashMap<String, String>();
211         }
212         return attributes;
213     }
214 
215     public void setAttributes(Map<String, String> attributes) {
216         this.attributes = attributes;
217     }
218 
219     /**
220      * Create and last update info for the structure. This is optional and treated as read only since the data is set by the internals of the service during maintenance operations.
221      */
222     public MetaInfo getMetaInfo() {
223         return metaInfo;
224     }
225 
226     public void setMetaInfo(MetaInfo metaInfo) {
227         this.metaInfo = metaInfo;
228     }
229 
230     /**
231      * Unique identifier for a proposal type.
232      */
233     public String getType() {
234         return type;
235     }
236 
237     public void setType(String type) {
238         this.type = type;
239     }
240 
241     /**
242      * The current status of the proposal. The values for this field are constrained to those in the proposalState enumeration. A separate setup operation does not exist for retrieval of the meta data around this value.
243      */
244     public String getState() {
245         return state;
246     }
247 
248     public void setState(String state) {
249         this.state = state;
250     }
251 
252     /**
253      * Unique identifier for a Proposal. This is optional, due to the identifier being set at the time of creation. Once the proposal has been created, this should be seen as required.
254      */
255     public String getId() {
256         return id;
257     }
258 
259     public void setId(String id) {
260         this.id = id;
261     }
262 
263     /**
264      * The workflow document associated with this proposal.
265      * @return
266      */
267 	public String getWorkflowId() {
268 		return workflowId;
269 	}
270 
271 	public void setWorkflowId(String workflowId) {
272 		this.workflowId = workflowId;
273 	}
274     
275     
276 }