1 17 package org.alfresco.service.cmr.security; 18 19 import java.util.Set ; 20 21 import org.alfresco.service.cmr.repository.NodeRef; 22 import org.alfresco.service.namespace.QName; 23 24 31 public interface PermissionService 32 { 33 public static final String ROLE_PREFIX = "ROLE_"; 34 35 public static final String GROUP_PREFIX = "GROUP_"; 36 37 38 39 public static final String ALL_AUTHORITIES = "GROUP_EVERYONE"; 40 41 public static final String OWNER_AUTHORITY = "ROLE_OWNER"; 42 43 public static final String LOCK_OWNER_AUTHORITY = "ROLE_LOCK_OWNER"; 44 45 public static final String ADMINISTRATOR_AUTHORITY = "ROLE_ADMINISTRATOR"; 46 47 public static final String GUEST_AUTHORITY = "guest"; 48 49 50 51 public static final String ALL_PERMISSIONS = "All"; 52 53 public static final String FULL_CONTROL = "FullControl"; 54 55 public static final String READ = "Read"; 56 57 public static final String WRITE = "Write"; 58 59 public static final String DELETE = "Delete"; 60 61 public static final String ADD_CHILDREN = "AddChildren"; 62 63 public static final String READ_PROPERTIES = "ReadProperties"; 64 65 public static final String READ_CHILDREN = "ReadChildren"; 66 67 public static final String WRITE_PROPERTIES = "WriteProperties"; 68 69 public static final String DELETE_NODE = "DeleteNode"; 70 71 public static final String DELETE_CHILDREN = "DeleteChildren"; 72 73 public static final String CREATE_CHILDREN = "CreateChildren"; 74 75 public static final String LINK_CHILDREN = "LinkChildren"; 76 77 public static final String DELETE_ASSOCIATIONS = "DeleteAssociations"; 78 79 public static final String READ_ASSOCIATIONS = "ReadAssociations"; 80 81 public static final String CREATE_ASSOCIATIONS = "CreateAssociations"; 82 83 public static final String READ_PERMISSIONS = "ReadPermissions"; 84 85 public static final String CHANGE_PERMISSIONS = "ChangePermissions"; 86 87 public static final String EXECUTE = "Execute"; 88 89 public static final String READ_CONTENT = "ReadContent"; 90 91 public static final String WRITE_CONTENT = "WriteContent"; 92 93 public static final String EXECUTE_CONTENT = "ExecuteContent"; 94 95 public static final String TAKE_OWNERSHIP = "TakeOwnership"; 96 97 public static final String SET_OWNER = "SetOwner"; 98 99 public static final String COORDINATOR = "Coordinator"; 100 101 public static final String CONTRIBUTOR = "Contributor"; 102 103 public static final String EDITOR = "Editor"; 104 105 public static final String CONSUMER = "Consumer"; 106 107 public static final String LOCK = "Lock"; 108 109 public static final String UNLOCK = "Unlock"; 110 111 public static final String CHECK_OUT = "CheckOut"; 112 113 public static final String CHECK_IN = "CheckIn"; 114 115 public static final String CANCEL_CHECK_OUT = "CancelCheckOut"; 116 117 122 public String getOwnerAuthority(); 123 124 129 public String getAllAuthorities(); 130 131 136 public String getAllPermission(); 137 138 146 public Set <AccessPermission> getPermissions(NodeRef nodeRef); 147 148 156 public Set <AccessPermission> getAllSetPermissions(NodeRef nodeRef); 157 158 164 public Set <String > getSettablePermissions(NodeRef nodeRef); 165 166 172 public Set <String > getSettablePermissions(QName type); 173 174 182 public AccessStatus hasPermission(NodeRef nodeRef, String perm); 183 184 189 public void deletePermissions(NodeRef nodeRef); 190 191 197 public void clearPermission(NodeRef nodeRef, String authority); 198 199 207 public void deletePermission(NodeRef nodeRef, String authority, String perm, boolean allow); 208 209 217 public void setPermission(NodeRef nodeRef, String authority, String perm, boolean allow); 218 219 225 public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions); 226 227 233 public boolean getInheritParentPermissions(NodeRef nodeRef); 234 } 235 | Popular Tags |