001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/presentation/api/src/java/org/theospi/portfolio/presentation/model/PresentationPage.java $
003: * $Id: PresentationPage.java 11426 2006-06-30 15:26:07Z 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.presentation.model;
021:
022: import java.io.Serializable;
023: import java.util.Date;
024: import java.util.HashSet;
025: import java.util.Set;
026:
027: import org.sakaiproject.metaobj.shared.model.Id;
028: import org.sakaiproject.metaobj.shared.model.IdentifiableObject;
029: import org.sakaiproject.tool.api.Tool;
030: import org.theospi.portfolio.style.model.Style;
031:
032: public class PresentationPage extends IdentifiableObject implements
033: Serializable, Comparable {
034:
035: private Id id;
036: private String title;
037: private String description;
038: private String keywords;
039: private Presentation presentation;
040: private PresentationLayout layout;
041: private Style style;
042: private int sequence;
043: private Set regions = new HashSet();
044: private Date created;
045: private Date modified;
046: private boolean newObject;
047:
048: public Id getId() {
049: return id;
050: }
051:
052: public void setId(Id id) {
053: this .id = id;
054: }
055:
056: public Set getRegions() {
057: return regions;
058: }
059:
060: public void setRegions(Set regions) {
061: this .regions = regions;
062: }
063:
064: public PresentationLayout getLayout() {
065: return layout;
066: }
067:
068: public void setLayout(PresentationLayout layout) {
069: this .layout = layout;
070: }
071:
072: public int getSequence() {
073: return sequence;
074: }
075:
076: public void setSequence(int sequence) {
077: this .sequence = sequence;
078: }
079:
080: public Style getStyle() {
081: return style;
082: }
083:
084: public void setStyle(Style style) {
085: this .style = style;
086: }
087:
088: public Presentation getPresentation() {
089: return presentation;
090: }
091:
092: public void setPresentation(Presentation presentation) {
093: this .presentation = presentation;
094: }
095:
096: public String getTitle() {
097: return title;
098: }
099:
100: public void setTitle(String title) {
101: this .title = title;
102: }
103:
104: public Date getCreated() {
105: return created;
106: }
107:
108: public void setCreated(Date created) {
109: this .created = created;
110: }
111:
112: public Date getModified() {
113: return modified;
114: }
115:
116: public void setModified(Date modified) {
117: this .modified = modified;
118: }
119:
120: public boolean isNewObject() {
121: return newObject;
122: }
123:
124: public void setNewObject(boolean newObject) {
125: this .newObject = newObject;
126: }
127:
128: public String getDescription() {
129: return description;
130: }
131:
132: public void setDescription(String description) {
133: this .description = description;
134: }
135:
136: public String getKeywords() {
137: return keywords;
138: }
139:
140: public void setKeywords(String keywords) {
141: this .keywords = keywords;
142: }
143:
144: public String getUrl() {
145: return "viewPresentation.osp?id="
146: + getPresentation().getId().getValue() + "&page="
147: + getId().getValue() + "&" + Tool.PLACEMENT_ID + "="
148: + getPresentation().getToolId();
149: }
150:
151: public int compareTo(Object o) {
152: PresentationPage other = (PresentationPage) o;
153: Integer seq = new Integer(getSequence());
154: Integer seqOther = new Integer(other.getSequence());
155: return seq.compareTo(seqOther);
156: }
157:
158: }
|