001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/wizard/api/src/java/org/theospi/portfolio/wizard/model/Wizard.java $
003: * $Id: Wizard.java 22351 2007-03-09 14:11:59Z bkirschn@umich.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.Date;
023:
024: import org.sakaiproject.metaobj.shared.model.Agent;
025: import org.sakaiproject.metaobj.shared.model.Id;
026: import org.theospi.portfolio.guidance.model.Guidance;
027: import org.theospi.portfolio.shared.model.ObjectWithWorkflow;
028: import org.theospi.portfolio.style.model.Style;
029: import org.theospi.portfolio.wizard.WizardFunctionConstants;
030:
031: /**
032: * The super class has the evaluation, reflection and review
033: *
034: */
035:
036: public class Wizard extends ObjectWithWorkflow {
037:
038: public final static String ROOT_TITLE = "root";
039:
040: private String name;
041: private String description;
042: private String keywords;
043: private Date created;
044: private Date modified;
045: private transient Agent owner;
046: private Id guidanceId;
047: private boolean published = false;
048: private boolean preview = false;
049: private String type = WizardFunctionConstants.WIZARD_TYPE_SEQUENTIAL;
050: private String exposedPageId;
051: private transient Boolean exposeAsTool = null;
052:
053: private String siteId;
054: private WizardCategory rootCategory;
055: private int sequence = 0;
056: private Style style;
057: private transient Id styleId;
058:
059: private transient Guidance guidance;
060:
061: private boolean newObject = false;
062:
063: public Wizard() {
064: }
065:
066: public Wizard(Id id, Agent owner, String siteId) {
067: setId(id);
068: this .owner = owner;
069: this .siteId = siteId;
070: newObject = true;
071: rootCategory = new WizardCategory(this );
072: rootCategory.setTitle(ROOT_TITLE);
073: }
074:
075: public String getType() {
076: return type;
077: }
078:
079: public void setType(String type) {
080: this .type = type;
081: }
082:
083: public Date getCreated() {
084: return created;
085: }
086:
087: public void setCreated(Date created) {
088: this .created = created;
089: }
090:
091: public String getDescription() {
092: return description;
093: }
094:
095: public void setDescription(String description) {
096: this .description = description;
097: }
098:
099: public Date getModified() {
100: return modified;
101: }
102:
103: public void setModified(Date modified) {
104: this .modified = modified;
105: }
106:
107: public String getName() {
108: return name;
109: }
110:
111: public void setName(String name) {
112: this .name = name;
113: }
114:
115: public Agent getOwner() {
116: return owner;
117: }
118:
119: public void setOwner(Agent owner) {
120: this .owner = owner;
121: }
122:
123: public boolean isNewObject() {
124: return newObject;
125: }
126:
127: public void setNewObject(boolean newObject) {
128: this .newObject = newObject;
129: }
130:
131: public String getSiteId() {
132: return siteId;
133: }
134:
135: public void setSiteId(String siteId) {
136: this .siteId = siteId;
137: }
138:
139: public String getKeywords() {
140: return keywords;
141: }
142:
143: public void setKeywords(String keywords) {
144: this .keywords = keywords;
145: }
146:
147: public Guidance getGuidance() {
148: return guidance;
149: }
150:
151: public void setGuidance(Guidance guidance) {
152: this .guidance = guidance;
153: }
154:
155: public Id getGuidanceId() {
156: return guidanceId;
157: }
158:
159: public void setGuidanceId(Id guidanceId) {
160: this .guidanceId = guidanceId;
161: }
162:
163: public boolean isPreview() {
164: return preview;
165: }
166:
167: public void setPreview(boolean preview) {
168: this .preview = preview;
169: }
170:
171: public boolean isPublished() {
172: return published;
173: }
174:
175: public void setPublished(boolean published) {
176: this .published = published;
177: }
178:
179: public Boolean getExposeAsTool() {
180: return exposeAsTool;
181: }
182:
183: public void setExposeAsTool(Boolean exposeAsTool) {
184: this .exposeAsTool = exposeAsTool;
185: }
186:
187: public String getExposedPageId() {
188: return exposedPageId;
189: }
190:
191: public void setExposedPageId(String exposedPageId) {
192: this .exposedPageId = exposedPageId;
193: }
194:
195: public WizardCategory getRootCategory() {
196: return rootCategory;
197: }
198:
199: public void setRootCategory(WizardCategory rootCategory) {
200: this .rootCategory = rootCategory;
201: }
202:
203: public int getSequence() {
204: return sequence;
205: }
206:
207: public void setSequence(int sequence) {
208: this .sequence = sequence;
209: }
210:
211: public Style getStyle() {
212: return style;
213: }
214:
215: public void setStyle(Style style) {
216: this .style = style;
217: }
218:
219: public Id getStyleId() {
220: return styleId;
221: }
222:
223: public void setStyleId(Id styleId) {
224: this .styleId = styleId;
225: }
226:
227: public boolean getHasPages() {
228: return rootCategory.getHasPages();
229: }
230: }
|