1 16 17 package org.apache.jetspeed.services.security; 18 19 import java.util.Iterator ; 20 21 import org.apache.turbine.services.Service; 22 import org.apache.jetspeed.om.security.Role; 23 24 34 35 public interface RoleManagement extends Service 36 { 37 public String SERVICE_NAME = "RoleManagement"; 38 39 public String DEFAULT_ROLE_NAME = "user"; 40 41 52 Iterator getRoles(String username) 53 throws JetspeedSecurityException; 54 55 65 Iterator getRoles() 66 throws JetspeedSecurityException; 67 68 77 void addRole(Role role) 78 throws JetspeedSecurityException; 79 80 89 void saveRole(Role role) 90 throws JetspeedSecurityException; 91 92 102 void removeRole(String rolename) 103 throws JetspeedSecurityException; 104 105 114 void grantRole(String username, String rolename) 115 throws JetspeedSecurityException; 116 117 void grantRole(String username, String rolename, String groupName) 118 throws JetspeedSecurityException; 119 120 129 void revokeRole(String username, String rolename) 130 throws JetspeedSecurityException; 131 132 void revokeRole(String username, String rolename, String groupname) 133 throws JetspeedSecurityException; 134 135 144 boolean hasRole(String username, String rolename) 145 throws JetspeedSecurityException; 146 147 boolean hasRole(String username, String rolename, String groupname) 148 throws JetspeedSecurityException; 149 150 161 Role getRole(String rolename) 162 throws JetspeedSecurityException; 163 164 } 165 166 167 168 169 170 171 172 173 174 | Popular Tags |