01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-api/src/java/org/sakaiproject/api/app/messageforums/PermissionLevelManager.java $
03: * $Id: PermissionLevelManager.java 9227 2006-05-15 15:02:42Z cwen@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.api.app.messageforums;
21:
22: import java.util.List;
23: import java.util.Set;
24:
25: import org.sakaiproject.api.app.messageforums.PermissionsMask;
26:
27: public interface PermissionLevelManager {
28: public static final String PERMISSION_LEVEL_NAME_OWNER = "Owner";
29: public static final String PERMISSION_LEVEL_NAME_AUTHOR = "Author";
30: public static final String PERMISSION_LEVEL_NAME_NONEDITING_AUTHOR = "Nonediting Author";
31: public static final String PERMISSION_LEVEL_NAME_CONTRIBUTOR = "Contributor";
32: public static final String PERMISSION_LEVEL_NAME_REVIEWER = "Reviewer";
33: public static final String PERMISSION_LEVEL_NAME_NONE = "None";
34: public static final String PERMISSION_LEVEL_NAME_CUSTOM = "Custom";
35:
36: public PermissionLevel getPermissionLevelByName(String name);
37:
38: public String getPermissionLevelType(PermissionLevel level);
39:
40: public PermissionLevel createPermissionLevel(String name,
41: String typeUuid, PermissionsMask mask);
42:
43: public PermissionLevel getDefaultOwnerPermissionLevel();
44:
45: public PermissionLevel getDefaultAuthorPermissionLevel();
46:
47: public PermissionLevel getDefaultNoneditingAuthorPermissionLevel();
48:
49: public PermissionLevel getDefaultReviewerPermissionLevel();
50:
51: public PermissionLevel getDefaultContributorPermissionLevel();
52:
53: public PermissionLevel getDefaultNonePermissionLevel();
54:
55: public DBMembershipItem createDBMembershipItem(String name,
56: String permissionLevelName, Integer type);
57:
58: public void saveDBMembershipItem(DBMembershipItem item);
59:
60: public void savePermissionLevel(PermissionLevel level);
61:
62: public List getOrderedPermissionLevelNames();
63:
64: public Boolean getCustomPermissionByName(
65: String customPermissionName, PermissionLevel permissionLevel);
66:
67: public List getCustomPermissions();
68:
69: public List getAllMembershipItemsForForumsForSite(final Long areaId);
70:
71: public List getAllMembershipItemsForTopicsForSite(final Long areaId);
72:
73: public void deleteMembershipItems(Set membershipSet);
74:
75: }
|