001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-hbm/src/java/org/sakaiproject/component/app/messageforums/dao/hibernate/MessagePermissionsImpl.java $
003: * $Id: MessagePermissionsImpl.java 9227 2006-05-15 15:02:42Z cwen@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 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.sakaiproject.component.app.messageforums.dao.hibernate;
021:
022: import org.apache.commons.logging.Log;
023: import org.apache.commons.logging.LogFactory;
024: import org.sakaiproject.api.app.messageforums.Area;
025: import org.sakaiproject.api.app.messageforums.BaseForum;
026: import org.sakaiproject.api.app.messageforums.MessagePermissions;
027: import org.sakaiproject.api.app.messageforums.Topic;
028:
029: public class MessagePermissionsImpl implements MessagePermissions {
030:
031: private static final Log LOG = LogFactory
032: .getLog(MessagePermissionsImpl.class);
033:
034: private String role;
035:
036: private Boolean read;
037:
038: private Boolean reviseAny;
039:
040: private Boolean reviseOwn;
041:
042: private Boolean deleteAny;
043:
044: private Boolean deleteOwn;
045:
046: private Boolean readDrafts;
047:
048: private Boolean defaultValue;
049:
050: private Boolean markAsRead;
051:
052: private Area area;
053:
054: private BaseForum forum;
055:
056: private Topic topic;
057:
058: // private int areaindex;
059: //
060: // private int forumindex;
061: //
062: // private int topicindex;
063:
064: private Long id;
065:
066: private Integer version;
067:
068: public Long getId() {
069: return id;
070: }
071:
072: public void setId(Long id) {
073: this .id = id;
074: }
075:
076: public Integer getVersion() {
077: return version;
078: }
079:
080: public void setVersion(Integer version) {
081: this .version = version;
082: }
083:
084: public Boolean getDeleteAny() {
085: return deleteAny;
086: }
087:
088: public void setDeleteAny(Boolean deleteAny) {
089: this .deleteAny = deleteAny;
090: }
091:
092: public Boolean getDeleteOwn() {
093: return deleteOwn;
094: }
095:
096: public void setDeleteOwn(Boolean deleteOwn) {
097: this .deleteOwn = deleteOwn;
098: }
099:
100: public Boolean getRead() {
101: return read;
102: }
103:
104: public void setRead(Boolean read) {
105: this .read = read;
106: }
107:
108: public Boolean getReadDrafts() {
109: return readDrafts;
110: }
111:
112: public void setReadDrafts(Boolean readDrafts) {
113: this .readDrafts = readDrafts;
114: }
115:
116: public Boolean getReviseAny() {
117: return reviseAny;
118: }
119:
120: public void setReviseAny(Boolean reviseAny) {
121: this .reviseAny = reviseAny;
122: }
123:
124: public Boolean getReviseOwn() {
125: return reviseOwn;
126: }
127:
128: public void setReviseOwn(Boolean reviseOwn) {
129: this .reviseOwn = reviseOwn;
130: }
131:
132: public String getRole() {
133: return role;
134: }
135:
136: public void setRole(String role) {
137: this .role = role;
138: }
139:
140: public Area getArea() {
141: return area;
142: }
143:
144: public void setArea(Area area) {
145: this .area = area;
146: }
147:
148: public BaseForum getForum() {
149: return forum;
150: }
151:
152: public void setForum(BaseForum forum) {
153: this .forum = forum;
154: }
155:
156: public Topic getTopic() {
157: return topic;
158: }
159:
160: public void setTopic(Topic topic) {
161: this .topic = topic;
162: }
163:
164: // public int getAreaindex() {
165: // try {
166: // return getArea().getOpenForums().indexOf(this);
167: // } catch (Exception e) {
168: // return areaindex;
169: // }
170: // }
171: //
172: // public void setAreaindex(int areaindex) {
173: // this.areaindex = areaindex;
174: // }
175: //
176: // public int getForumindex() {
177: // try {
178: // return getForum().getTopics().indexOf(this);
179: // } catch (Exception e) {
180: // return forumindex;
181: // }
182: // }
183: //
184: // public void setForumindex(int forumindex) {
185: // this.forumindex = forumindex;
186: // }
187: //
188: // public int getTopicindex() {
189: // try {
190: // return getTopic().getMessages().indexOf(this);
191: // } catch (Exception e) {
192: // return topicindex;
193: // }
194: // }
195: //
196: // public void setTopicindex(int topicindex) {
197: // this.topicindex = topicindex;
198: // }
199:
200: public String toString() {
201: return "MessagePermissions/" + id;
202: //return "MessagePermissions.id:" + id;
203: }
204:
205: public Boolean getDefaultValue() {
206: return defaultValue;
207: }
208:
209: public void setDefaultValue(Boolean defaultValue) {
210: this .defaultValue = defaultValue;
211: }
212:
213: public Boolean getMarkAsRead() {
214: return this .markAsRead;
215: }
216:
217: public void setMarkAsRead(Boolean markAsRead) {
218: this.markAsRead = markAsRead;
219: }
220:
221: }
|