Interface LdapCacheService
-
- All Known Implementing Classes:
DefaultLdapCacheService
public interface LdapCacheService
LdapCacheService Service that manages the LDAP caches: LDAP connections and LDAP users- Version:
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
getUser
LdapUser getUser(String username)
Retrieve LDAP user with the given username from the cache. Returns null if user is not found.- Parameters:
username
-- Returns:
-
removeUser
boolean removeUser(String username)
Remove LDAP user with the given username from the cache. Returns the removed object if it was in the cache. Otherwise, returns null.- Parameters:
username
-- Returns:
-
removeAllUsers
void removeAllUsers()
Remove all LDAP users in the cache. In short, it flushes the cache.
-
getLdapUserDn
String getLdapUserDn(String username)
Retrieve the cached LDAP userDn for the given user.- Parameters:
username
-- Returns:
-
removeLdapUserDn
boolean removeLdapUserDn(String username)
Remove the cached LDAP userDn for the given user.- Parameters:
username
-- Returns:
-
removeAllLdapUserDn
void removeAllLdapUserDn()
Remove all cached LDAP userDn
-
addLdapUserDn
void addLdapUserDn(String username, String userDn)
All the LDAP userDn for the given user to the cache- Parameters:
username
-userDn
-
-
-