001: /**********************************************************************************
002: * $URL:https://source.sakaiproject.org/svn/osp/trunk/wizard/api/src/java/org/theospi/portfolio/wizard/model/CompletedWizard.java $
003: * $Id:CompletedWizard.java 9134 2006-05-08 20:28:42Z chmaurer@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.wizard.model;
021:
022: import java.util.ArrayList;
023: import java.util.Date;
024: import java.util.List;
025:
026: import org.sakaiproject.metaobj.shared.mgt.ReadableObjectHome;
027: import org.sakaiproject.metaobj.shared.model.Agent;
028: import org.sakaiproject.metaobj.shared.model.Artifact;
029: import org.sakaiproject.metaobj.shared.model.IdentifiableObject;
030: import org.theospi.portfolio.matrix.MatrixFunctionConstants;
031:
032: /**
033: * Created by IntelliJ IDEA.
034: * User: John Ellis
035: * Date: Jan 21, 2006
036: * Time: 3:16:08 PM
037: * To change this template use File | Settings | File Templates.
038: */
039: public class CompletedWizard extends IdentifiableObject implements
040: Artifact {
041:
042: private Wizard wizard;
043: private CompletedWizardCategory rootCategory;
044: private Agent owner;
045: private Date created;
046: private Date lastVisited;
047: private String status;
048: private ReadableObjectHome home;
049:
050: private transient List reflections = new ArrayList();
051: private transient List evaluations = new ArrayList();
052: private transient List feedback = new ArrayList();
053:
054: public final static String TYPE = "wizard_type";
055: public final static String PROCESS_TYPE_KEY = "completed_wizard_id";
056:
057: public CompletedWizard() {
058: }
059:
060: public CompletedWizard(Wizard wizard, Agent owner) {
061: this .wizard = wizard;
062: this .owner = owner;
063: setStatus(MatrixFunctionConstants.READY_STATUS);
064: setCreated(new Date());
065: setLastVisited(new Date());
066: setRootCategory(new CompletedWizardCategory(this , wizard
067: .getRootCategory()));
068: getRootCategory().setExpanded(true); // root should alway be expanded
069: }
070:
071: public Wizard getWizard() {
072: return wizard;
073: }
074:
075: public void setWizard(Wizard wizard) {
076: this .wizard = wizard;
077: }
078:
079: public Agent getOwner() {
080: return owner;
081: }
082:
083: public void setOwner(Agent owner) {
084: this .owner = owner;
085: }
086:
087: public Date getCreated() {
088: return created;
089: }
090:
091: public void setCreated(Date created) {
092: this .created = created;
093: }
094:
095: public Date getLastVisited() {
096: return lastVisited;
097: }
098:
099: public void setLastVisited(Date lastVisited) {
100: this .lastVisited = lastVisited;
101: }
102:
103: public CompletedWizardCategory getRootCategory() {
104: return rootCategory;
105: }
106:
107: public void setRootCategory(CompletedWizardCategory rootCategory) {
108: this .rootCategory = rootCategory;
109: }
110:
111: public String getStatus() {
112: return status;
113: }
114:
115: public void setStatus(String status) {
116: this .status = status;
117: }
118:
119: public ReadableObjectHome getHome() {
120: return home;
121: }
122:
123: public void setHome(ReadableObjectHome home) {
124: this .home = home;
125:
126: }
127:
128: public String getDisplayName() {
129: return wizard.getName();
130: }
131:
132: /**
133: * @return the evaluations
134: */
135: public List getEvaluations() {
136: return evaluations;
137: }
138:
139: /**
140: * @param evaluations the evaluations to set
141: */
142: public void setEvaluations(List evaluations) {
143: this .evaluations = evaluations;
144: }
145:
146: /**
147: * @return the feedback
148: */
149: public List getFeedback() {
150: return feedback;
151: }
152:
153: /**
154: * @param feedback the feedback to set
155: */
156: public void setFeedback(List feedback) {
157: this .feedback = feedback;
158: }
159:
160: /**
161: * @return the reflections
162: */
163: public List getReflections() {
164: return reflections;
165: }
166:
167: /**
168: * @param reflections the reflections to set
169: */
170: public void setReflections(List reflections) {
171: this.reflections = reflections;
172: }
173:
174: }
|