001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-hbm/src/java/org/sakaiproject/component/app/messageforums/dao/hibernate/ControlPermissionsImpl.java $
003: * $Id: ControlPermissionsImpl.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.ControlPermissions;
027: import org.sakaiproject.api.app.messageforums.Topic;
028:
029: public class ControlPermissionsImpl implements ControlPermissions {
030:
031: private static final Log LOG = LogFactory
032: .getLog(ControlPermissionsImpl.class);
033:
034: private String role;
035:
036: private Boolean postToGradebook;
037:
038: private Boolean newForum;
039:
040: private Boolean newTopic;
041:
042: private Boolean newResponse;
043:
044: private Boolean responseToResponse;
045:
046: private Boolean movePostings;
047:
048: private Boolean changeSettings;
049:
050: private Boolean defaultValue;
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 getPostToGradebook() {
085: return postToGradebook;
086: }
087:
088: public void setPostToGradebook(Boolean postToGradebook) {
089: this .postToGradebook = postToGradebook;
090: }
091:
092: public Boolean getChangeSettings() {
093: return changeSettings;
094: }
095:
096: public void setChangeSettings(Boolean changeSettings) {
097: this .changeSettings = changeSettings;
098: }
099:
100: public Boolean getMovePostings() {
101: return movePostings;
102: }
103:
104: public void setMovePostings(Boolean movePostings) {
105: this .movePostings = movePostings;
106: }
107:
108: public Boolean getNewResponse() {
109: return newResponse;
110: }
111:
112: public void setNewResponse(Boolean newResponse) {
113: this .newResponse = newResponse;
114: }
115:
116: public Boolean getNewTopic() {
117: return newTopic;
118: }
119:
120: public void setNewTopic(Boolean newTopic) {
121: this .newTopic = newTopic;
122: }
123:
124: public Boolean getResponseToResponse() {
125: return responseToResponse;
126: }
127:
128: public void setResponseToResponse(Boolean responseToResponse) {
129: this .responseToResponse = responseToResponse;
130: }
131:
132: public Boolean getDefaultValue() {
133: return defaultValue;
134: }
135:
136: public void setDefaultValue(Boolean defaultValue) {
137: this .defaultValue = defaultValue;
138: }
139:
140: public String getRole() {
141: return role;
142: }
143:
144: public void setRole(String role) {
145: this .role = role;
146: }
147:
148: public Boolean getNewForum() {
149: return newForum;
150: }
151:
152: public void setNewForum(Boolean newForum) {
153: this .newForum = newForum;
154: }
155:
156: public Area getArea() {
157: return area;
158: }
159:
160: public void setArea(Area area) {
161: this .area = area;
162: }
163:
164: public BaseForum getForum() {
165: return forum;
166: }
167:
168: public void setForum(BaseForum forum) {
169: this .forum = forum;
170: }
171:
172: public Topic getTopic() {
173: return topic;
174: }
175:
176: public void setTopic(Topic topic) {
177: this .topic = topic;
178: }
179:
180: // public int getAreaindex() {
181: // try {
182: // return getArea().getOpenForums().indexOf(this);
183: // } catch (Exception e) {
184: // return areaindex;
185: // }
186: // }
187: //
188: // public void setAreaindex(int areaindex) {
189: // this.areaindex = areaindex;
190: // }
191: //
192: // public int getForumindex() {
193: // try {
194: // return getForum().getTopics().indexOf(this);
195: // } catch (Exception e) {
196: // return forumindex;
197: // }
198: // }
199: //
200: // public void setForumindex(int forumindex) {
201: // this.forumindex = forumindex;
202: // }
203: //
204: // public int getTopicindex() {
205: // try {
206: // return getTopic().getMessages().indexOf(this);
207: // } catch (Exception e) {
208: // return topicindex;
209: // }
210: // }
211: //
212: // public void setTopicindex(int topicindex) {
213: // this.topicindex = topicindex;
214: // }
215:
216: public String toString() {
217: return "ControlPermissions/" + id;
218: //return "ControlPermissions.id:" + id;
219: }
220:
221: }
|