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 voidaddLdapUserDn(String username, String userDn)All the LDAP userDn for the given user to the cachevoidaddUser(LdapUser user)Adds the user to the LDAP users cache.StringgetLdapUserDn(String username)Retrieve the cached LDAP userDn for the given user.LdapUsergetUser(String username)Retrieve LDAP user with the given username from the cache.voidremoveAllLdapUserDn()Remove all cached LDAP userDnvoidremoveAllUsers()Remove all LDAP users in the cache.booleanremoveLdapUserDn(String username)Remove the cached LDAP userDn for the given user.booleanremoveUser(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:LdapCacheServiceRetrieve LDAP user with the given username from the cache. Returns null if user is not found.- Specified by:
getUserin interfaceLdapCacheService- Returns:
- See Also:
LdapCacheService.getUser(String)
-
removeUser
public boolean removeUser(String username)
Description copied from interface:LdapCacheServiceRemove LDAP user with the given username from the cache. Returns the removed object if it was in the cache. Otherwise, returns null.- Specified by:
removeUserin interfaceLdapCacheService- Returns:
- See Also:
LdapCacheService.removeUser(String)
-
removeAllUsers
public void removeAllUsers()
Description copied from interface:LdapCacheServiceRemove all LDAP users in the cache. In short, it flushes the cache.- Specified by:
removeAllUsersin interfaceLdapCacheService- See Also:
LdapCacheService.removeAllUsers()
-
addUser
public void addUser(LdapUser user)
Description copied from interface:LdapCacheServiceAdds the user to the LDAP users cache.- Specified by:
addUserin interfaceLdapCacheService- See Also:
LdapCacheService.addUser(org.apache.archiva.redback.common.ldap.user.LdapUser)
-
getLdapUserDn
public String getLdapUserDn(String username)
Description copied from interface:LdapCacheServiceRetrieve the cached LDAP userDn for the given user.- Specified by:
getLdapUserDnin interfaceLdapCacheService- Returns:
- See Also:
LdapCacheService.getLdapUserDn(String)
-
removeLdapUserDn
public boolean removeLdapUserDn(String username)
Description copied from interface:LdapCacheServiceRemove the cached LDAP userDn for the given user.- Specified by:
removeLdapUserDnin interfaceLdapCacheService- Returns:
- See Also:
LdapCacheService.removeLdapUserDn(String)
-
removeAllLdapUserDn
public void removeAllLdapUserDn()
Description copied from interface:LdapCacheServiceRemove all cached LDAP userDn- Specified by:
removeAllLdapUserDnin interfaceLdapCacheService- See Also:
LdapCacheService.removeAllLdapUserDn()
-
addLdapUserDn
public void addLdapUserDn(String username, String userDn)
Description copied from interface:LdapCacheServiceAll the LDAP userDn for the given user to the cache- Specified by:
addLdapUserDnin interfaceLdapCacheService- See Also:
LdapCacheService.addLdapUserDn(String, String)
-
-