Class DefaultLdapCacheService
- java.lang.Object
-
- org.apache.archiva.redback.users.ldap.service.DefaultLdapCacheService
-
- All Implemented Interfaces:
LdapCacheService
@Service public class DefaultLdapCacheService extends Object implements LdapCacheService
DefaultLdapCacheService- Version:
-
-
Constructor Summary
Constructors Constructor Description DefaultLdapCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLdapUserDn(String username, String userDn)
All the LDAP userDn for the given user to the cachevoid
addUser(LdapUser user)
Adds the user to the LDAP users cache.String
getLdapUserDn(String username)
Retrieve the cached LDAP userDn for the given user.LdapUser
getUser(String username)
Retrieve LDAP user with the given username from the cache.void
removeAllLdapUserDn()
Remove all cached LDAP userDnvoid
removeAllUsers()
Remove all LDAP users in the cache.boolean
removeLdapUserDn(String username)
Remove the cached LDAP userDn for the given user.boolean
removeUser(String username)
Remove LDAP user with the given username from the cache.
-
-
-
Constructor Detail
-
DefaultLdapCacheService
public DefaultLdapCacheService()
-
-
Method Detail
-
getUser
public LdapUser getUser(String username)
Description copied from interface:LdapCacheService
Retrieve LDAP user with the given username from the cache. Returns null if user is not found.- Specified by:
getUser
in interfaceLdapCacheService
- Returns:
- See Also:
LdapCacheService.getUser(String)
-
removeUser
public boolean removeUser(String username)
Description copied from interface:LdapCacheService
Remove LDAP user with the given username from the cache. Returns the removed object if it was in the cache. Otherwise, returns null.- Specified by:
removeUser
in interfaceLdapCacheService
- Returns:
- See Also:
LdapCacheService.removeUser(String)
-
removeAllUsers
public void removeAllUsers()
Description copied from interface:LdapCacheService
Remove all LDAP users in the cache. In short, it flushes the cache.- Specified by:
removeAllUsers
in interfaceLdapCacheService
- See Also:
LdapCacheService.removeAllUsers()
-
addUser
public void addUser(LdapUser user)
Description copied from interface:LdapCacheService
Adds the user to the LDAP users cache.- Specified by:
addUser
in interfaceLdapCacheService
- See Also:
LdapCacheService.addUser(org.apache.archiva.redback.common.ldap.user.LdapUser)
-
getLdapUserDn
public String getLdapUserDn(String username)
Description copied from interface:LdapCacheService
Retrieve the cached LDAP userDn for the given user.- Specified by:
getLdapUserDn
in interfaceLdapCacheService
- Returns:
- See Also:
LdapCacheService.getLdapUserDn(String)
-
removeLdapUserDn
public boolean removeLdapUserDn(String username)
Description copied from interface:LdapCacheService
Remove the cached LDAP userDn for the given user.- Specified by:
removeLdapUserDn
in interfaceLdapCacheService
- Returns:
- See Also:
LdapCacheService.removeLdapUserDn(String)
-
removeAllLdapUserDn
public void removeAllLdapUserDn()
Description copied from interface:LdapCacheService
Remove all cached LDAP userDn- Specified by:
removeAllLdapUserDn
in interfaceLdapCacheService
- See Also:
LdapCacheService.removeAllLdapUserDn()
-
addLdapUserDn
public void addLdapUserDn(String username, String userDn)
Description copied from interface:LdapCacheService
All the LDAP userDn for the given user to the cache- Specified by:
addLdapUserDn
in interfaceLdapCacheService
- See Also:
LdapCacheService.addLdapUserDn(String, String)
-
-