com.xebialabs.deployit.security
Class RoleServiceImpl
java.lang.Object
com.xebialabs.deployit.security.RoleServiceImpl
- All Implemented Interfaces:
- RoleService
@Component
public class RoleServiceImpl
- extends java.lang.Object
- implements RoleService
Extracts and stores roles in JCR
The Multimap<String, String> which is used to communicate is a mapping with:
- key: role name
- value: principals associated to the role
However the storage in JCR is:
- propertyname: principal
- propertyvalue: comma-separated roles
The reason for this is that it makes for a very fast lookup when logging in.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleServiceImpl
@Autowired
public RoleServiceImpl(JcrTemplate jcrTemplate)
readRoles
public java.util.List<Role> readRoles()
- Specified by:
readRoles in interface RoleService
readRoleAssignments
public java.util.List<Role> readRoleAssignments()
- Specified by:
readRoleAssignments in interface RoleService
writeRoleAssignments
public void writeRoleAssignments(java.util.List<Role> roles)
- Specified by:
writeRoleAssignments in interface RoleService
getRoleForRoleName
public Role getRoleForRoleName(java.lang.String roleName)
- Specified by:
getRoleForRoleName in interface RoleService
getRolesFor
public java.util.List<Role> getRolesFor(org.springframework.security.core.Authentication auth)
- Specified by:
getRolesFor in interface RoleService
getRolesFor
public java.util.List<Role> getRolesFor(java.lang.String principal)
- Specified by:
getRolesFor in interface RoleService