001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/matrix/api/src/java/org/theospi/portfolio/matrix/model/ScaffoldingCell.java $
003: * $Id: ScaffoldingCell.java 12988 2006-07-26 15:56:54Z andersjb@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2005, 2006 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.io.Serializable;
023: import java.util.Collection;
024: import java.util.HashSet;
025: import java.util.List;
026: import java.util.Set;
027:
028: import org.sakaiproject.metaobj.shared.model.Id;
029: import org.sakaiproject.metaobj.shared.model.IdentifiableObject;
030: import org.theospi.portfolio.guidance.model.Guidance;
031:
032: /**
033: * @author chmaurer
034: */
035: public class ScaffoldingCell extends IdentifiableObject implements
036: Serializable {
037: private Criterion rootCriterion;
038: private Level level;
039: private Scaffolding scaffolding;
040: private Set cells = new HashSet();
041: private WizardPageDefinition wizardPageDefinition;
042:
043: public ScaffoldingCell() {
044: this .wizardPageDefinition = new WizardPageDefinition();
045: }
046:
047: public ScaffoldingCell(Criterion criterion, Level level,
048: String initialStatus, Scaffolding scaffolding) {
049: this .rootCriterion = criterion;
050: this .level = level;
051: this .wizardPageDefinition = new WizardPageDefinition();
052: wizardPageDefinition.setInitialStatus(initialStatus);
053: wizardPageDefinition.setSiteId(scaffolding.getWorksiteId()
054: .getValue());
055: this .scaffolding = scaffolding;
056: }
057:
058: public boolean equals(Object other) {
059: if (other == this )
060: return true;
061: if (other == null || !(other instanceof ScaffoldingCell))
062: return false;
063: //TODO need better equals method
064: if (this .getId() == null)
065: return false;
066: return (this .getId().equals(((ScaffoldingCell) other).getId()));
067:
068: }
069:
070: /**
071: * @return String Returns the title.
072: */
073: public String getTitle() {
074: return wizardPageDefinition.getTitle();
075: }
076:
077: /**
078: * @param title String The title to set.
079: */
080: public void setTitle(String title) {
081: wizardPageDefinition.setTitle(title);
082: }
083:
084: /**
085: * @return Returns the level.
086: */
087: public Level getLevel() {
088: return level;
089: }
090:
091: /**
092: * @param level The level to set.
093: */
094: public void setLevel(Level level) {
095: this .level = level;
096: }
097:
098: /**
099: * @return Returns the rootCriterion.
100: */
101: public Criterion getRootCriterion() {
102: return rootCriterion;
103: }
104:
105: /**
106: * @param rootCriterion The rootCriterion to set.
107: */
108: public void setRootCriterion(Criterion rootCriterion) {
109: this .rootCriterion = rootCriterion;
110: }
111:
112: /**
113: * @return Returns the scaffolding.
114: */
115: public Scaffolding getScaffolding() {
116: return scaffolding;
117: }
118:
119: /**
120: * @param scaffolding The scaffolding to set.
121: */
122: public void setScaffolding(Scaffolding scaffolding) {
123: this .scaffolding = scaffolding;
124: }
125:
126: /**
127: * @return Returns the initialStatus.
128: */
129: public String getInitialStatus() {
130: return wizardPageDefinition.getInitialStatus();
131: }
132:
133: /**
134: * @param initialStatus The initialStatus to set.
135: */
136: public void setInitialStatus(String initialStatus) {
137: wizardPageDefinition.setInitialStatus(initialStatus);
138: }
139:
140: /**
141: * @return Returns the evaluators.
142: */
143: public Collection getEvaluators() {
144: return wizardPageDefinition.getEvaluators();
145: }
146:
147: /**
148: * @param evaluators The evaluators to set.
149: */
150: public void setEvaluators(Collection evaluators) {
151: wizardPageDefinition.setEvaluators(evaluators);
152: }
153:
154: /**
155: * @return Returns the validate.
156: */
157: public boolean isValidate() {
158: return wizardPageDefinition.isValidate();
159: }
160:
161: /**
162: * @param validate The validate to set.
163: */
164: public void setValidate(boolean validate) {
165: wizardPageDefinition.setValidate(validate);
166: }
167:
168: public Set getCells() {
169: return cells;
170: }
171:
172: public void setCells(Set cells) {
173: this .cells = cells;
174: }
175:
176: public Id getEvaluationDevice() {
177: return wizardPageDefinition.getEvaluationDevice();
178: }
179:
180: public void setEvaluationDevice(Id evaluationDevice) {
181: wizardPageDefinition.setEvaluationDevice(evaluationDevice);
182: }
183:
184: public String getEvaluationDeviceType() {
185: return wizardPageDefinition.getEvaluationDeviceType();
186: }
187:
188: public void setEvaluationDeviceType(String evaluationDeviceType) {
189: wizardPageDefinition
190: .setEvaluationDeviceType(evaluationDeviceType);
191: }
192:
193: public Id getReflectionDevice() {
194: return wizardPageDefinition.getReflectionDevice();
195: }
196:
197: public void setReflectionDevice(Id reflectionDevice) {
198: wizardPageDefinition.setReflectionDevice(reflectionDevice);
199: }
200:
201: public String getReflectionDeviceType() {
202: return wizardPageDefinition.getReflectionDeviceType();
203: }
204:
205: public void setReflectionDeviceType(String reflectionDeviceType) {
206: wizardPageDefinition
207: .setReflectionDeviceType(reflectionDeviceType);
208: }
209:
210: /**
211: * This is for getting the feedback/comments form id
212: * @param reviewDevice
213: */
214: public Id getReviewDevice() {
215: return wizardPageDefinition.getReviewDevice();
216: }
217:
218: /**
219: * This is for setting the feedback/comments form id
220: * @param reviewDevice
221: */
222: public void setReviewDevice(Id reviewDevice) {
223: wizardPageDefinition.setReviewDevice(reviewDevice);
224: }
225:
226: public String getReviewDeviceType() {
227: return wizardPageDefinition.getReviewDeviceType();
228: }
229:
230: public void setReviewDeviceType(String reviewDeviceType) {
231: wizardPageDefinition.setReviewDeviceType(reviewDeviceType);
232: }
233:
234: /**
235: * @return Returns the guidanceId.
236: */
237: public Id getGuidanceId() {
238: return wizardPageDefinition.getGuidanceId();
239: }
240:
241: /**
242: * @param guidanceId The guidanceId to set.
243: */
244: public void setGuidanceId(Id guidanceId) {
245: wizardPageDefinition.setGuidanceId(guidanceId);
246: }
247:
248: /**
249: * @return Returns the guidance.
250: */
251: public Guidance getGuidance() {
252: return wizardPageDefinition.getGuidance();
253: }
254:
255: /**
256: * @param guidance The guidance to set.
257: */
258: public void setGuidance(Guidance guidance) {
259: wizardPageDefinition.setGuidance(guidance);
260: }
261:
262: /**
263: * @return Returns the deleteGuidanceId.
264: */
265: public Id getDeleteGuidanceId() {
266: return wizardPageDefinition.getDeleteGuidanceId();
267: }
268:
269: /**
270: * @param deleteGuidanceId The deleteGuidanceId to set.
271: */
272: public void setDeleteGuidanceId(Id deleteGuidanceId) {
273: wizardPageDefinition.setDeleteGuidanceId(deleteGuidanceId);
274: }
275:
276: /**
277: * @return Returns the additionalForms.
278: */
279: public List getAdditionalForms() {
280: return wizardPageDefinition.getAdditionalForms();
281: }
282:
283: /**
284: * @param additionalForms The additionalForms to set.
285: */
286: public void setAdditionalForms(List additionalForms) {
287: wizardPageDefinition.setAdditionalForms(additionalForms);
288: }
289:
290: public WizardPageDefinition getWizardPageDefinition() {
291: return wizardPageDefinition;
292: }
293:
294: public void setWizardPageDefinition(
295: WizardPageDefinition wizardPageDefinition) {
296: this.wizardPageDefinition = wizardPageDefinition;
297: }
298: }
|