001: /**********************************************************************************
002: * $URL:https://source.sakaiproject.org/svn/osp/trunk/matrix/api/src/java/org/theospi/portfolio/matrix/model/WizardPage.java $
003: * $Id:WizardPage.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2005, 2006, 2007 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.theospi.portfolio.matrix.model;
021:
022: import java.util.ArrayList;
023: import java.util.Date;
024: import java.util.HashSet;
025: import java.util.List;
026: import java.util.Set;
027:
028: import org.sakaiproject.metaobj.shared.model.Agent;
029: import org.sakaiproject.metaobj.shared.model.Id;
030: import org.sakaiproject.metaobj.shared.model.IdentifiableObject;
031:
032: /**
033: * Created by IntelliJ IDEA.
034: * User: John Ellis
035: * Date: Jan 11, 2006
036: * Time: 4:14:37 PM
037: * To change this template use File | Settings | File Templates.
038: */
039: public class WizardPage extends IdentifiableObject {
040:
041: private Set attachments = new HashSet();
042: private String status;
043: private WizardPageDefinition pageDefinition;
044: private Set<WizardPageForm> pageForms = new HashSet<WizardPageForm>();
045: private Date modified;
046:
047: private Agent owner;
048:
049: private transient List reflections = new ArrayList();
050: private transient List evaluations = new ArrayList();
051: private transient List feedback = new ArrayList();
052:
053: public final static String TYPE = "wizard_page_type";
054: public final static String PROCESS_TYPE_KEY = "page_id";
055:
056: /**
057: * Set of class Attachment
058: * @return Returns Set of Attachments
059: */
060: public Set getAttachments() {
061: return attachments;
062: }
063:
064: /**
065: * @param attachments A Set of class Attachment.
066: */
067: public void setAttachments(Set attachments) {
068: this .attachments = attachments;
069: }
070:
071: /**
072: * @return Returns the status.
073: */
074: public String getStatus() {
075: return status.toUpperCase();
076: }
077:
078: /**
079: * @param status The status to set.
080: */
081: public void setStatus(String status) {
082: this .status = status.toUpperCase();
083: }
084:
085: /* (non-Javadoc)
086: * @see java.lang.Object#equals(java.lang.Object)
087: */
088: public boolean equals(Object in) {
089: if (this == in) {
090: return true;
091: }
092: if (in == null && this == null) {
093: return true;
094: }
095: if (in == null && this != null) {
096: return false;
097: }
098: if (this == null && in != null) {
099: return false;
100: }
101: if (!this .getClass().isAssignableFrom(in.getClass())) {
102: return false;
103: }
104: if (this .getId() == null
105: && ((IdentifiableObject) in).getId() == null) {
106: return false;
107: }
108: if (this .getId() == null
109: || ((IdentifiableObject) in).getId() == null) {
110: return false;
111: }
112: return this .getId().equals(((IdentifiableObject) in).getId());
113: }
114:
115: /* (non-Javadoc)
116: * @see java.lang.Object#hashCode()
117: */
118: public int hashCode() {
119: //TODO need better hashcode
120: Id id = this .getId();
121: if (id == null)
122: return 0;
123: return id.getValue().hashCode();
124: }
125:
126: public WizardPageDefinition getPageDefinition() {
127: return pageDefinition;
128: }
129:
130: public void setPageDefinition(WizardPageDefinition pageDefinition) {
131: this .pageDefinition = pageDefinition;
132: }
133:
134: /**
135: * @return Returns the Set of class WizardPageForm.
136: */
137: public Set<WizardPageForm> getPageForms() {
138: return pageForms;
139: }
140:
141: /**
142: * @param pageForms A set of class WizardPageForm.
143: */
144: public void setPageForms(Set<WizardPageForm> pageForms) {
145: this .pageForms = pageForms;
146: }
147:
148: /**
149: * @return Returns the modified.
150: */
151: public Date getModified() {
152: return modified;
153: }
154:
155: /**
156: * @param modified The modified to set.
157: */
158: public void setModified(Date modified) {
159: this .modified = modified;
160: }
161:
162: public Agent getOwner() {
163: return owner;
164: }
165:
166: public void setOwner(Agent owner) {
167: this .owner = owner;
168: }
169:
170: /**
171: * @return the evaluations
172: */
173: public List getEvaluations() {
174: return evaluations;
175: }
176:
177: /**
178: * @param evaluations the evaluations to set
179: */
180: public void setEvaluations(List evaluations) {
181: this .evaluations = evaluations;
182: }
183:
184: /**
185: * @return the feedback
186: */
187: public List getFeedback() {
188: return feedback;
189: }
190:
191: /**
192: * @param feedback the feedback to set
193: */
194: public void setFeedback(List feedback) {
195: this .feedback = feedback;
196: }
197:
198: /**
199: * @return the reflections
200: */
201: public List getReflections() {
202: return reflections;
203: }
204:
205: /**
206: * @param reflections the reflections to set
207: */
208: public void setReflections(List reflections) {
209: this.reflections = reflections;
210: }
211:
212: }
|