001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/common/api/src/java/org/theospi/portfolio/style/model/Style.java $
003: * $Id: Style.java 16905 2006-10-09 13:27:37Z chmaurer@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 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.style.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.sakaiproject.metaobj.shared.model.IdentifiableObject;
027:
028: public class Style extends IdentifiableObject {
029:
030: private String name;
031: private String description;
032: private Id styleFile;
033: private Agent owner;
034: private Date created = new Date();
035: private Date modified = new Date();
036: private String siteId;
037: private String styleHash;
038:
039: transient private String styleFileName;
040: transient private String filePickerAction;
041: transient private boolean validate = true;
042: transient private String nodeRef;
043:
044: public static final int STATE_UNPUBLISHED = 0;
045: public static final int STATE_WAITING_APPROVAL = 1;
046: public static final int STATE_PUBLISHED = 2;
047:
048: /**
049: * should be one of the following states
050: *
051: * unpublished -> waiting for approval-> active
052: */
053: private int globalState;
054:
055: public String getDescription() {
056: return description;
057: }
058:
059: public void setDescription(String description) {
060: this .description = description;
061: }
062:
063: public Id getStyleFile() {
064: return styleFile;
065: }
066:
067: public void setStyleFile(Id styleFile) {
068: this .styleFile = styleFile;
069: }
070:
071: public String getName() {
072: return name;
073: }
074:
075: public void setName(String name) {
076: this .name = name;
077: }
078:
079: public Date getCreated() {
080: return created;
081: }
082:
083: public void setCreated(Date created) {
084: this .created = created;
085: }
086:
087: public int getGlobalState() {
088: return globalState;
089: }
090:
091: public void setGlobalState(int globalState) {
092: this .globalState = globalState;
093: }
094:
095: public Date getModified() {
096: return modified;
097: }
098:
099: public void setModified(Date modified) {
100: this .modified = modified;
101: }
102:
103: public Agent getOwner() {
104: return owner;
105: }
106:
107: public void setOwner(Agent owner) {
108: this .owner = owner;
109: }
110:
111: public String getSiteId() {
112: return siteId;
113: }
114:
115: public void setSiteId(String siteId) {
116: this .siteId = siteId;
117: }
118:
119: public String getStyleFileName() {
120: return styleFileName;
121: }
122:
123: public void setStyleFileName(String styleFileName) {
124: this .styleFileName = styleFileName;
125: }
126:
127: public String getFilePickerAction() {
128: return filePickerAction;
129: }
130:
131: public void setFilePickerAction(String filePickerAction) {
132: this .filePickerAction = filePickerAction;
133: }
134:
135: public boolean isValidate() {
136: return validate;
137: }
138:
139: public void setValidate(boolean validate) {
140: this .validate = validate;
141: }
142:
143: public String getNodeRef() {
144: return nodeRef;
145: }
146:
147: public void setNodeRef(String nodeRef) {
148: this .nodeRef = nodeRef;
149: }
150:
151: /**
152: * @return the styleHash
153: */
154: public String getStyleHash() {
155: return styleHash;
156: }
157:
158: /**
159: * @param styleHash the styleHash to set
160: */
161: public void setStyleHash(String styleHash) {
162: this.styleHash = styleHash;
163: }
164:
165: }
|