Class DefaultLdapController
- java.lang.Object
-
- org.apache.archiva.redback.users.ldap.ctl.DefaultLdapController
-
- All Implemented Interfaces:
LdapController
@Service public class DefaultLdapController extends Object implements LdapController
- Author:
- jesse
-
-
Constructor Summary
Constructors Constructor Description DefaultLdapController()
-
Method Summary
-
-
-
Constructor Detail
-
DefaultLdapController
public DefaultLdapController()
-
-
Method Detail
-
initialize
@PostConstruct public void initialize()
- Specified by:
initialize
in interfaceLdapController
-
removeUser
public void removeUser(String principal, DirContext context) throws LdapControllerException
- Specified by:
removeUser
in interfaceLdapController
- Throws:
LdapControllerException
- See Also:
LdapController.removeUser(String, javax.naming.directory.DirContext)
-
updateUser
public void updateUser(User user, DirContext context) throws LdapControllerException, MappingException
- Specified by:
updateUser
in interfaceLdapController
- Throws:
LdapControllerException
MappingException
- See Also:
LdapController.updateUser(org.apache.archiva.redback.users.User, javax.naming.directory.DirContext)
-
userExists
public boolean userExists(String key, DirContext context) throws LdapControllerException
- Specified by:
userExists
in interfaceLdapController
- Throws:
LdapControllerException
- See Also:
LdapController.userExists(String, javax.naming.directory.DirContext)
-
searchUsers
protected NamingEnumeration<SearchResult> searchUsers(String key, DirContext context) throws NamingException
- Throws:
NamingException
-
searchUsers
protected NamingEnumeration<SearchResult> searchUsers(DirContext context) throws NamingException
- Throws:
NamingException
-
searchUsers
protected NamingEnumeration<SearchResult> searchUsers(DirContext context, String[] returnAttributes) throws NamingException
- Throws:
NamingException
-
searchUsers
protected NamingEnumeration<SearchResult> searchUsers(DirContext context, String[] returnAttributes, LdapUserQuery query) throws NamingException
- Throws:
NamingException
-
getUsers
public Collection<User> getUsers(DirContext context) throws LdapControllerException, MappingException
- Specified by:
getUsers
in interfaceLdapController
- Throws:
LdapControllerException
MappingException
- See Also:
LdapController.getUsers(javax.naming.directory.DirContext)
-
getUsersByQuery
public List<User> getUsersByQuery(LdapUserQuery query, DirContext context) throws LdapControllerException, MappingException
- Specified by:
getUsersByQuery
in interfaceLdapController
- Throws:
LdapControllerException
MappingException
- See Also:
LdapController.getUsersByQuery(org.apache.archiva.redback.users.ldap.LdapUserQuery, javax.naming.directory.DirContext)
-
createUser
public void createUser(User user, DirContext context, boolean encodePasswordIfChanged) throws LdapControllerException, MappingException
- Specified by:
createUser
in interfaceLdapController
- Throws:
LdapControllerException
MappingException
- See Also:
LdapController.createUser(org.apache.archiva.redback.users.User, javax.naming.directory.DirContext, boolean)
-
getUser
public LdapUser getUser(String username, DirContext context) throws LdapControllerException, MappingException
- Specified by:
getUser
in interfaceLdapController
- Throws:
LdapControllerException
MappingException
- See Also:
LdapController.getUser(String, javax.naming.directory.DirContext)
-
findUsersWithRoles
public Map<String,Collection<String>> findUsersWithRoles(DirContext dirContext) throws LdapControllerException
- Specified by:
findUsersWithRoles
in interfaceLdapController
- Returns:
- Map key == username and value == list of role names
- Throws:
LdapControllerException
-
getMapper
public UserMapper getMapper()
-
setMapper
public void setMapper(UserMapper mapper)
-
getUserConf
public UserConfiguration getUserConf()
-
setUserConf
public void setUserConf(UserConfiguration userConf)
-
isWritableLdap
public boolean isWritableLdap()
-
setWritableLdap
public void setWritableLdap(boolean writableLdap)
-
getPasswordEncoder
public PasswordEncoder getPasswordEncoder()
-
setPasswordEncoder
public void setPasswordEncoder(PasswordEncoder passwordEncoder)
-
getGroupsDn
public String getGroupsDn()
-
setGroupsDn
public void setGroupsDn(String groupsDn)
-
getLdapGroupClass
public String getLdapGroupClass()
-
setLdapGroupClass
public void setLdapGroupClass(String ldapGroupClass)
-
-