Class DefaultLdapRoleMapperConfiguration
- java.lang.Object
-
- org.apache.archiva.redback.common.ldap.role.DefaultLdapRoleMapperConfiguration
-
- All Implemented Interfaces:
LdapRoleMapperConfiguration
@Service("ldapRoleMapperConfiguration#default") public class DefaultLdapRoleMapperConfiguration extends Object implements LdapRoleMapperConfiguration
This implementation is only in memory you must use a different one if you need to save datas.- Since:
- 2.1
- Author:
- Olivier Lamy
-
-
Constructor Summary
Constructors Constructor Description DefaultLdapRoleMapperConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLdapMapping(String ldapGroup, List<String> roles)
add mapping ldap group to redback rolesCollection<String>
getLdapGroupMapping(String groupName)
Returns the mapping for the given groupMap<String,Collection<String>>
getLdapGroupMappings()
void
removeLdapMapping(String group)
remove a mappingvoid
setLdapGroupMappings(Map<String,List<String>> mappings)
void
updateLdapMapping(String ldapGroup, List<String> roles)
update an existing mapping
-
-
-
Constructor Detail
-
DefaultLdapRoleMapperConfiguration
public DefaultLdapRoleMapperConfiguration()
-
-
Method Detail
-
addLdapMapping
public void addLdapMapping(String ldapGroup, List<String> roles) throws MappingException
Description copied from interface:LdapRoleMapperConfiguration
add mapping ldap group to redback roles- Specified by:
addLdapMapping
in interfaceLdapRoleMapperConfiguration
- Parameters:
ldapGroup
- ldap grouproles
- list of Role names- Throws:
MappingException
-
removeLdapMapping
public void removeLdapMapping(String group)
Description copied from interface:LdapRoleMapperConfiguration
remove a mapping- Specified by:
removeLdapMapping
in interfaceLdapRoleMapperConfiguration
- Parameters:
group
- ldap group
-
updateLdapMapping
public void updateLdapMapping(String ldapGroup, List<String> roles) throws MappingException
Description copied from interface:LdapRoleMapperConfiguration
update an existing mapping- Specified by:
updateLdapMapping
in interfaceLdapRoleMapperConfiguration
- Throws:
MappingException
-
setLdapGroupMappings
public void setLdapGroupMappings(Map<String,List<String>> mappings) throws MappingException
- Specified by:
setLdapGroupMappings
in interfaceLdapRoleMapperConfiguration
- Throws:
MappingException
-
getLdapGroupMappings
public Map<String,Collection<String>> getLdapGroupMappings()
- Specified by:
getLdapGroupMappings
in interfaceLdapRoleMapperConfiguration
- Returns:
- Map of corresponding LDAP group (key) and Redback roles (value)
-
getLdapGroupMapping
public Collection<String> getLdapGroupMapping(String groupName) throws MappingException
Description copied from interface:LdapRoleMapperConfiguration
Returns the mapping for the given group- Specified by:
getLdapGroupMapping
in interfaceLdapRoleMapperConfiguration
- Parameters:
groupName
- the group name- Returns:
- the list of roles
- Throws:
MappingException
-
-