001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/common/api/src/java/org/theospi/portfolio/review/model/Review.java $
003: * $Id: Review.java 22017 2007-02-28 20:09:20Z 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.review.model;
021:
022: import org.sakaiproject.metaobj.shared.model.Id;
023: import org.sakaiproject.metaobj.shared.model.IdentifiableObject;
024: import org.theospi.portfolio.shared.model.Node;
025:
026: public class Review extends IdentifiableObject {
027:
028: public static final int REFLECTION_TYPE = 0;
029: public static final int EVALUATION_TYPE = 1;
030: public static final int FEEDBACK_TYPE = 2;
031:
032: private String siteId;
033: private String parent; // e.g. pageId
034: private String deviceId; // e.g. form type
035: private String itemId; // (optional) review related to a specific item
036: private int type; // reflection, evaluation or feedback
037: private Id reviewContent;
038: transient private Node reviewContentNode;
039:
040: private boolean newObject = false;
041:
042: public Review() {
043: }
044:
045: public Review(Id id, String description, String siteId) {
046: this .siteId = siteId;
047: setId(id);
048: newObject = true;
049:
050: }
051:
052: /**
053: * @return Returns the reviewContent.
054: */
055: public Id getReviewContent() {
056: return reviewContent;
057: }
058:
059: /**
060: * @param reviewContent The reviewContent to set.
061: */
062: public void setReviewContent(Id reviewContent) {
063: this .reviewContent = reviewContent;
064: }
065:
066: /**
067: * @return Returns the reviewDevice.
068: */
069: public String getParent() {
070: return parent;
071: }
072:
073: /**
074: * @param reviewDevice The reviewDevice to set.
075: */
076: public void setParent(String parent) {
077: this .parent = parent;
078: }
079:
080: /**
081: * @return Returns the newObject.
082: */
083: public boolean isNewObject() {
084: return newObject;
085: }
086:
087: /**
088: * @param newObject The newObject to set.
089: */
090: public void setNewObject(boolean newObject) {
091: this .newObject = newObject;
092: }
093:
094: /**
095: * @return Returns the siteId.
096: */
097: public String getSiteId() {
098: return siteId;
099: }
100:
101: /**
102: * @param siteId The siteId to set.
103: */
104: public void setSiteId(String siteId) {
105: this .siteId = siteId;
106: }
107:
108: /**
109: * @return Returns the deviceId.
110: */
111: public String getDeviceId() {
112: return deviceId;
113: }
114:
115: /**
116: * @param deviceId The deviceId to set.
117: */
118: public void setDeviceId(String deviceId) {
119: this .deviceId = deviceId;
120: }
121:
122: /**
123: * @return Returns the itemId
124: * (e.g. feedback may be related to specific item)
125: */
126: public String getItemId() {
127: return itemId;
128: }
129:
130: /**
131: * @param itemId The itemId to set.
132: * (e.g. feedback may be related to specific item)
133: */
134: public void setItemId(String itemId) {
135: this .itemId = itemId;
136: }
137:
138: /**
139: * @return Returns the type.
140: */
141: public int getType() {
142: return type;
143: }
144:
145: /**
146: * @param type The type to set.
147: */
148: public void setType(int type) {
149: this .type = type;
150: }
151:
152: /**
153: * @return Returns the reviewContentNode.
154: */
155: public Node getReviewContentNode() {
156: return reviewContentNode;
157: }
158:
159: /**
160: * @param reviewContentNode The reviewContentNode to set.
161: */
162: public void setReviewContentNode(Node reviewContentNode) {
163: this.reviewContentNode = reviewContentNode;
164: }
165:
166: }
|