1 17 18 package org.apache.james.imapserver; 19 20 import org.apache.james.imapserver.AccessControlException; 21 import org.apache.james.imapserver.AuthorizationException; 22 23 import java.io.Serializable ; 24 import java.util.Set ; 25 26 49 public interface ACL 50 extends Serializable { 51 52 char LOOKUP_RIGHTS = 'l'; 53 char READ_RIGHTS = 'r'; 54 char KEEP_SEEN_RIGHTS = 's'; 55 char WRITE_RIGHTS = 'w'; 56 char INSERT_RIGHTS = 'i'; 57 char POST_RIGHTS = 'p'; 58 char CREATE_RIGHTS = 'c'; 59 char DELETE_RIGHTS = 'd'; 60 char ADMIN_RIGHTS = 'a'; 61 char ADD_RIGHTS = '+'; 62 char REMOVE_RIGHTS = '-'; 63 char[] RIGHTS = 64 { 65 LOOKUP_RIGHTS, READ_RIGHTS, KEEP_SEEN_RIGHTS, WRITE_RIGHTS, 66 INSERT_RIGHTS, POST_RIGHTS, CREATE_RIGHTS, DELETE_RIGHTS, 67 ADMIN_RIGHTS 68 }; 69 70 95 boolean setRights( String setter, 96 String identifier, 97 String modification) 98 throws AccessControlException, AuthorizationException; 99 100 114 String getRights( String getter, String identity ) 115 throws AccessControlException, AuthorizationException; 116 117 129 String getAllRights( String getter ) 130 throws AccessControlException, AuthorizationException; 131 132 146 String getRequiredRights( String getter, String identity ) 147 throws AccessControlException, AuthorizationException; 148 149 162 String getOptionalRights( String getter, String identity ) 163 throws AccessControlException, AuthorizationException; 164 165 175 boolean hasReadRights( String username ) 176 throws AccessControlException; 177 boolean hasKeepSeenRights( String username ) 178 throws AccessControlException; 179 boolean hasWriteRights( String username ) 180 throws AccessControlException; 181 boolean hasInsertRights( String username ) 182 throws AccessControlException; 183 boolean hasDeleteRights( String username ) 184 throws AccessControlException; 185 boolean hasAdminRights( String username ) 186 throws AccessControlException; 187 188 Set getUsersWithLookupRights(); 189 190 Set getUsersWithReadRights(); 191 } 192 193 | Popular Tags |