001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-api/src/java/org/sakaiproject/api/app/messageforums/ui/UIPermissionsManager.java $
003: * $Id: UIPermissionsManager.java 9227 2006-05-15 15:02:42Z cwen@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006, 2007 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.api.app.messageforums.ui;
021:
022: import java.util.Iterator;
023: import java.util.List;
024: import java.util.Set;
025:
026: import org.sakaiproject.api.app.messageforums.DiscussionForum;
027: import org.sakaiproject.api.app.messageforums.DiscussionTopic;
028: import org.sakaiproject.api.app.messageforums.Area;
029:
030: /**
031: * @author <a href="mailto:rshastri@iupui.edu">Rashmi Shastri</a>
032: */
033: public interface UIPermissionsManager {
034:
035: /**
036: * @return
037: */
038: public boolean isNewForum();
039:
040: /**
041: * @return
042: */
043: public boolean isChangeSettings(DiscussionForum forum);
044:
045: /**
046: * @param forum
047: * @return
048: */
049: public boolean isNewTopic(DiscussionForum forum);
050:
051: /**
052: * @param topic
053: * @return
054: */
055: public boolean isNewResponse(DiscussionTopic topic,
056: DiscussionForum forum);
057:
058: /**
059: * @param topic
060: * @return
061: */
062: public boolean isNewResponseToResponse(DiscussionTopic topic,
063: DiscussionForum forum);
064:
065: /**
066: * @param topic
067: * @return
068: */
069: public boolean isMovePostings(DiscussionTopic topic,
070: DiscussionForum forum);
071:
072: /**
073: * @param topic
074: * @return
075: */
076: public boolean isChangeSettings(DiscussionTopic topic,
077: DiscussionForum forum);
078:
079: /**
080: * @param topic
081: * @return
082: */
083: public boolean isPostToGradebook(DiscussionTopic topic,
084: DiscussionForum forum);
085:
086: /**
087: * @param topic
088: * @return
089: */
090: public boolean isRead(DiscussionTopic topic, DiscussionForum forum);
091:
092: /**
093: * @param topic
094: * @return
095: */
096: public boolean isReviseAny(DiscussionTopic topic,
097: DiscussionForum forum);
098:
099: /**
100: * @param topic
101: * @return
102: */
103: public boolean isReviseOwn(DiscussionTopic topic,
104: DiscussionForum forum);
105:
106: /**
107: * @param topic
108: * @return
109: */
110: public boolean isDeleteAny(DiscussionTopic topic,
111: DiscussionForum forum);
112:
113: /**
114: * @param topic
115: * @return
116: */
117: public boolean isDeleteOwn(DiscussionTopic topic,
118: DiscussionForum forum);
119:
120: /**
121: * @param topic
122: * @return
123: */
124: public boolean isMarkAsRead(DiscussionTopic topic,
125: DiscussionForum forum);
126:
127: /**
128: * Returns whether current user has perm to moderate in this situation
129: * @param topic
130: * @param forum
131: * @return
132: */
133: public boolean isModeratePostings(DiscussionTopic topic,
134: DiscussionForum forum);
135:
136: /**
137: * Returns list of current user's memberships
138: * (role + groups/sections)
139: * @return
140: */
141: public List getCurrentUserMemberships();
142:
143: public Set getAreaItemsSet(Area area);
144:
145: public Set getForumItemsSet(DiscussionForum forum);
146:
147: public Set getTopicItemsSet(DiscussionTopic topic);
148: }
|