public class CollectiveAttributeInterceptor extends BaseInterceptor
| Modifier and Type | Class and Description |
|---|---|
private class |
CollectiveAttributeInterceptor.CollectiveAttributeFilter
the search result filter to use for collective attribute injection
|
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG
The LoggerFactory used by this Interceptor
|
private EntryFilter |
searchFilter
The CollectiveAttribute search filter
|
directoryService, dnFactory, PWD_POLICY_STATE_ATTRIBUTE_TYPES, schemaManager| Constructor and Description |
|---|
CollectiveAttributeInterceptor()
Creates a new instance of a CollectiveAttributeInterceptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Filters
Partition#add( AddOperationContext ) call. |
private void |
addCollectiveAttributes(FilteringOperationContext opContext,
org.apache.directory.api.ldap.model.entry.Entry entry)
Adds the set of collective attributes requested in the returning attribute list
and contained in subentries referenced by the entry.
|
private void |
checkAdd(org.apache.directory.api.ldap.model.name.Dn normName,
org.apache.directory.api.ldap.model.entry.Entry entry)
Check if we can add an entry.
|
private void |
checkModify(ModifyOperationContext modifyContext)
Check that we can modify an entry
|
private boolean |
containsAnyCollectiveAttributes(org.apache.directory.api.ldap.model.entry.Entry entry)
Check if the entry contains any collective AttributeType (those starting with 'c-')
|
private boolean |
hasCollectiveAttributes(java.util.List<org.apache.directory.api.ldap.model.entry.Modification> mods)
Check that we have a CollectiveAttribute in the modifications.
|
void |
init(DirectoryService directoryService)
This method does nothing by default.
|
org.apache.directory.api.ldap.model.entry.Entry |
lookup(LookupOperationContext lookupContext)
Filters
Partition#lookup( LookupOperationContext ) call. |
void |
modify(ModifyOperationContext modifyContext)
Filters
Partition#modify( ModifyOperationContext ) call. |
EntryFilteringCursor |
search(SearchOperationContext searchContext)
Filters
Partition#search( SearchOperationContext ) call. |
bind, compare, delete, destroy, getName, getNextInterceptor, getPrincipal, getRootDse, hasEntry, move, moveAndRename, next, next, next, next, next, next, next, next, next, next, next, next, next, rename, unbindprivate static final org.slf4j.Logger LOG
private final EntryFilter searchFilter
public CollectiveAttributeInterceptor()
public void init(DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
init in interface Interceptorinit in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void add(AddOperationContext addContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#add( AddOperationContext ) call.add in interface Interceptoradd in class BaseInterceptoraddContext - The AddOperationContext instanceorg.apache.directory.api.ldap.model.exception.LdapException - If we had some error while processing the Add operationpublic org.apache.directory.api.ldap.model.entry.Entry lookup(LookupOperationContext lookupContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#lookup( LookupOperationContext ) call.lookup in interface Interceptorlookup in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void modify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#modify( ModifyOperationContext ) call.modify in interface Interceptormodify in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic EntryFilteringCursor search(SearchOperationContext searchContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#search( SearchOperationContext ) call.search in interface Interceptorsearch in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprivate void checkAdd(org.apache.directory.api.ldap.model.name.Dn normName,
org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate void checkModify(ModifyOperationContext modifyContext) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate boolean hasCollectiveAttributes(java.util.List<org.apache.directory.api.ldap.model.entry.Modification> mods)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate boolean containsAnyCollectiveAttributes(org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate void addCollectiveAttributes(FilteringOperationContext opContext, org.apache.directory.api.ldap.model.entry.Entry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
opContext - the context of the operation collective attributes
are added toentry - the entry to have the collective attributes injectedorg.apache.directory.api.ldap.model.exception.LdapException - if there are problems accessing subentries