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 LdapRoleMapperConfigurationThis 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 voidaddLdapMapping(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()voidremoveLdapMapping(String group)remove a mappingvoidsetLdapGroupMappings(Map<String,List<String>> mappings)voidupdateLdapMapping(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:LdapRoleMapperConfigurationadd mapping ldap group to redback roles- Specified by:
addLdapMappingin interfaceLdapRoleMapperConfiguration- Parameters:
ldapGroup- ldap grouproles- list of Role names- Throws:
MappingException
-
removeLdapMapping
public void removeLdapMapping(String group)
Description copied from interface:LdapRoleMapperConfigurationremove a mapping- Specified by:
removeLdapMappingin interfaceLdapRoleMapperConfiguration- Parameters:
group- ldap group
-
updateLdapMapping
public void updateLdapMapping(String ldapGroup, List<String> roles) throws MappingException
Description copied from interface:LdapRoleMapperConfigurationupdate an existing mapping- Specified by:
updateLdapMappingin interfaceLdapRoleMapperConfiguration- Throws:
MappingException
-
setLdapGroupMappings
public void setLdapGroupMappings(Map<String,List<String>> mappings) throws MappingException
- Specified by:
setLdapGroupMappingsin interfaceLdapRoleMapperConfiguration- Throws:
MappingException
-
getLdapGroupMappings
public Map<String,Collection<String>> getLdapGroupMappings()
- Specified by:
getLdapGroupMappingsin 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:LdapRoleMapperConfigurationReturns the mapping for the given group- Specified by:
getLdapGroupMappingin interfaceLdapRoleMapperConfiguration- Parameters:
groupName- the group name- Returns:
- the list of roles
- Throws:
MappingException
-
-