public class NormalizationInterceptor extends BaseInterceptor
DefaultPartitionNexus.
The Filters are also normalized.
If the Rdn AttributeTypes are not present in the entry for an Add request,
they will be added.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG
logger used by this class
|
private FilterNormalizingVisitor |
normVisitor
a filter node value normalizer and undefined node remover
|
directoryService, dnFactory, PWD_POLICY_STATE_ATTRIBUTE_TYPES, schemaManager| Constructor and Description |
|---|
NormalizationInterceptor()
Creates a new instance of a NormalizationInterceptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Filters
Partition#add( AddOperationContext ) call. |
private void |
addRdnAttributesToEntry(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Entry entry)
Adds missing Rdn's attributes and values to the entry.
|
boolean |
compare(CompareOperationContext compareContext)
Filters
DefaultPartitionNexus#compare( CompareOperationContext ) call. |
void |
delete(DeleteOperationContext deleteContext)
Filters
Partition#delete( DeleteOperationContext ) call. |
void |
destroy()
The destroy method does nothing
|
private org.apache.directory.api.ldap.model.filter.ExprNode |
handleAndNode(org.apache.directory.api.ldap.model.filter.ExprNode node)
Remove the (ObjectClass=*) node from an AndNode, if we have one.
|
private org.apache.directory.api.ldap.model.filter.ExprNode |
handleNotNode(org.apache.directory.api.ldap.model.filter.ExprNode node)
Remove the (ObjectClass=*) node from a NotNode, if we have one.
|
private org.apache.directory.api.ldap.model.filter.ExprNode |
handleOrNode(org.apache.directory.api.ldap.model.filter.ExprNode node)
Remove the (ObjectClass=*) node from an OrNode, if we have one.
|
boolean |
hasEntry(HasEntryOperationContext hasEntryContext)
Filters
Partition#hasEntry( HasEntryOperationContext ) call. |
void |
init(DirectoryService directoryService)
Initialize the registries, normalizers.
|
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. |
void |
move(MoveOperationContext moveContext)
Filters
Partition#move( MoveOperationContext ) call. |
void |
moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
Filters
Partition#moveAndRename( MoveAndRenameOperationContext) call. |
private org.apache.directory.api.ldap.model.filter.ExprNode |
removeObjectClass(org.apache.directory.api.ldap.model.filter.ExprNode node)
Remove the (ObjectClass=*) node from the filter, if we have one.
|
void |
rename(RenameOperationContext renameContext)
Filters
Partition#rename( RenameOperationContext ) call. |
EntryFilteringCursor |
search(SearchOperationContext searchContext)
Filters
Partition#search( SearchOperationContext ) call. |
bind, getName, getNextInterceptor, getPrincipal, getRootDse, next, next, next, next, next, next, next, next, next, next, next, next, next, unbindprivate static final org.slf4j.Logger LOG
private FilterNormalizingVisitor normVisitor
public NormalizationInterceptor()
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 destroy()
destroy in interface Interceptordestroy in class BaseInterceptorpublic 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 boolean compare(CompareOperationContext compareContext) throws org.apache.directory.api.ldap.model.exception.LdapException
DefaultPartitionNexus#compare( CompareOperationContext ) call.compare in interface Interceptorcompare in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#delete( DeleteOperationContext ) call.delete in interface Interceptordelete in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic boolean hasEntry(HasEntryOperationContext hasEntryContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#hasEntry( HasEntryOperationContext ) call.hasEntry in interface InterceptorhasEntry in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic 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 void move(MoveOperationContext moveContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#move( MoveOperationContext ) call.move in interface Interceptormove in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void moveAndRename(MoveAndRenameOperationContext moveAndRenameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#moveAndRename( MoveAndRenameOperationContext) call.moveAndRename in interface InterceptormoveAndRename in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void rename(RenameOperationContext renameContext) throws org.apache.directory.api.ldap.model.exception.LdapException
Partition#rename( RenameOperationContext ) call.rename in interface Interceptorrename 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 org.apache.directory.api.ldap.model.filter.ExprNode handleAndNode(org.apache.directory.api.ldap.model.filter.ExprNode node)
private org.apache.directory.api.ldap.model.filter.ExprNode handleNotNode(org.apache.directory.api.ldap.model.filter.ExprNode node)
private org.apache.directory.api.ldap.model.filter.ExprNode handleOrNode(org.apache.directory.api.ldap.model.filter.ExprNode node)
private org.apache.directory.api.ldap.model.filter.ExprNode removeObjectClass(org.apache.directory.api.ldap.model.filter.ExprNode node)
private void addRdnAttributesToEntry(org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
dn - the Dnentry - the entryorg.apache.directory.api.ldap.model.exception.LdapException