1 16 17 package org.apache.jetspeed.services.security; 18 19 import java.util.Iterator ; 20 21 import org.apache.jetspeed.om.security.Group; 22 import org.apache.jetspeed.om.security.Permission; 23 import org.apache.jetspeed.om.security.Role; 24 import org.apache.turbine.services.Service; 25 26 32 33 34 public interface SecurityCacheService extends Service 35 { 36 37 public String SERVICE_NAME = "SecurityCache"; 38 39 44 public void load(String username) 45 throws JetspeedSecurityException; 46 47 52 public void unload(String username); 53 54 55 public void loadRolePermissions(); 56 57 63 public Role getRole(String username, String roleName); 64 65 public Role getRole(String username, String roleName, String groupName); 66 67 71 public void addRole(Role role); 72 73 public void addRole(String username, Role role); 74 75 public void addRole(String username, Role role, Group group); 76 77 public boolean hasRole(String username, String roleName); 78 79 public boolean hasRole(String username, String roleName, String groupName); 80 81 public void removeRole(String username, String roleName); 82 83 public void removeRole(String username, String roleName, String groupName); 84 85 public Iterator getRoles(String username); 86 87 public CachedAcl getAcl(String username); 88 89 public Permission getPermission(String roleName, String permissionName); 90 91 public void addPermission(String roleName, Permission permission); 92 93 public boolean hasPermission(String roleName, String permissionName); 94 95 public void removePermission(String roleName, String permissionName); 96 97 public Iterator getPermissions(String roleName); 98 99 public void removeAllRoles(String rolename); 100 101 public void removeAllPermissions(String permissionName); 102 103 } 104 105 106 107 | Popular Tags |