public class GroupCache extends Object
| Constructor and Description |
|---|
GroupCache(CoreSession session)
Creates a static group cache.
|
| Modifier and Type | Method and Description |
|---|---|
Set<org.apache.directory.shared.ldap.name.DN> |
getGroups(String member)
Gets the set of groups a user is a member of.
|
void |
groupAdded(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.entry.ServerEntry entry)
Adds a groups members to the cache.
|
void |
groupDeleted(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.entry.ServerEntry entry)
Deletes a group's members from the cache.
|
void |
groupModified(org.apache.directory.shared.ldap.name.DN name,
List<org.apache.directory.shared.ldap.entry.Modification> mods,
org.apache.directory.shared.ldap.entry.ServerEntry entry,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
Modifies the cache to reflect changes via modify operations to the group entries.
|
void |
groupModified(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
org.apache.directory.shared.ldap.entry.ServerEntry mods)
Modifies the cache to reflect changes via modify operations to the group entries.
|
boolean |
groupRenamed(org.apache.directory.shared.ldap.name.DN oldName,
org.apache.directory.shared.ldap.name.DN newName) |
boolean |
isPrincipalAnAdministrator(org.apache.directory.shared.ldap.name.DN principalDn)
An optimization.
|
public GroupCache(CoreSession session) throws Exception
directoryService - the directory service coreorg.apache.directory.shared.ldap.exception.LdapException - if there are failures on initializationExceptionpublic void groupAdded(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.entry.ServerEntry entry)
throws org.apache.directory.shared.ldap.exception.LdapException
name - the user provided name for the group entryentry - the group entry's attributesorg.apache.directory.shared.ldap.exception.LdapException - if there are problems accessing the attr valuespublic void groupDeleted(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.entry.ServerEntry entry)
throws org.apache.directory.shared.ldap.exception.LdapException
name - the normalized DN of the group entryentry - the attributes of entry being deletedorg.apache.directory.shared.ldap.exception.LdapExceptionpublic void groupModified(org.apache.directory.shared.ldap.name.DN name,
List<org.apache.directory.shared.ldap.entry.Modification> mods,
org.apache.directory.shared.ldap.entry.ServerEntry entry,
org.apache.directory.shared.ldap.schema.SchemaManager schemaManager)
throws org.apache.directory.shared.ldap.exception.LdapException
name - the normalized name of the group entry modifiedmods - the modification operations being performedentry - the group entry being modifiedorg.apache.directory.shared.ldap.exception.LdapException - if there are problems accessing attribute valuespublic void groupModified(org.apache.directory.shared.ldap.name.DN name,
org.apache.directory.shared.ldap.entry.ModificationOperation modOp,
org.apache.directory.shared.ldap.entry.ServerEntry mods)
throws org.apache.directory.shared.ldap.exception.LdapException
name - the normalized name of the group entry modifiedmodOp - the modify operation being performedmods - the modifications being performedorg.apache.directory.shared.ldap.exception.LdapException - if there are problems accessing attribute valuespublic final boolean isPrincipalAnAdministrator(org.apache.directory.shared.ldap.name.DN principalDn)
principalDn - the normalized DN of the user to check if they are an adminpublic Set<org.apache.directory.shared.ldap.name.DN> getGroups(String member) throws org.apache.directory.shared.ldap.exception.LdapException
member - the member (user) to get the groups fororg.apache.directory.shared.ldap.exception.LdapException - if there are problems accessing attribute valuespublic boolean groupRenamed(org.apache.directory.shared.ldap.name.DN oldName,
org.apache.directory.shared.ldap.name.DN newName)
Copyright © 2003-2012 Apache Software Foundation. All Rights Reserved.