com.xebialabs.deployit.security
Interface RoleService

All Known Implementing Classes:
RoleServiceImpl

public interface RoleService

Reads roles from the repository and allows editing. The ordinary getSomething() methods return Roles without the assigned principals. Only readRoleAssignments() will a return a list with Role objects that also contain the principals. To edit the roles, first get a local copy of everything using readRoleAssignments(), then write them all back with writeRoleAssignments(List).


Method Summary
 Role getRoleForRoleName(java.lang.String roleName)
           
 java.util.List<Role> getRoles()
           
 java.util.List<Role> getRolesFor(org.springframework.security.core.Authentication auth)
           
 java.util.List<Role> getRolesFor(java.lang.String principal)
           
 java.util.List<Role> readRoleAssignments()
           
 void writeRoleAssignments(java.util.List<Role> roles)
           
 

Method Detail

getRoles

java.util.List<Role> getRoles()

getRolesFor

java.util.List<Role> getRolesFor(java.lang.String principal)

getRolesFor

java.util.List<Role> getRolesFor(org.springframework.security.core.Authentication auth)

getRoleForRoleName

Role getRoleForRoleName(java.lang.String roleName)

readRoleAssignments

java.util.List<Role> readRoleAssignments()

writeRoleAssignments

void writeRoleAssignments(java.util.List<Role> roles)