public class OperationalAttributeInterceptor extends BaseInterceptor
Interceptor that adds or modifies the default attributes
of entries. There are six default attributes for now;
'creatorsName', 'createTimestamp', 'modifiersName',
'modifyTimestamp', entryUUID and entryCSN.| Modifier and Type | Class and Description |
|---|---|
private class |
OperationalAttributeInterceptor.OperationalAttributeDenormalizingSearchFilter
the search result filter to use for collective attribute injection
|
private class |
OperationalAttributeInterceptor.OperationalAttributeSearchFilter
the search result filter to use for the addition of mandatory operational attributes
|
| Modifier and Type | Field and Description |
|---|---|
private org.apache.directory.api.ldap.model.name.Dn |
adminDn
The admin Dn
|
private EntryFilter |
denormalizingSearchFilter
The denormalizer filter
|
private static org.slf4j.Logger |
LOG
The LoggerFactory used by this Interceptor
|
private EntryFilter |
operationalAttributeSearchFilter
The filter that add the mandatory operational attributes
|
private org.apache.directory.api.ldap.model.name.Dn |
subschemaSubentryDn
The subschemasubentry Dn
|
directoryService, dnFactory, PWD_POLICY_STATE_ATTRIBUTE_TYPES, schemaManager| Constructor and Description |
|---|
OperationalAttributeInterceptor()
Creates the operational attribute management service interceptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Filters
Partition#add( AddOperationContext ) call. |
private boolean |
checkAddOperationalAttribute(boolean isAdmin,
org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.schema.AttributeType attribute)
Check if we have to add an operational attribute, or if the admin has injected one
|
void |
delete(DeleteOperationContext deleteContext)
Filters
Partition#delete( DeleteOperationContext ) call. |
private void |
denormalizeEntryOpAttrs(org.apache.directory.api.ldap.model.entry.Entry entry) |
private org.apache.directory.api.ldap.model.name.Dn |
denormalizeTypes(org.apache.directory.api.ldap.model.name.Dn dn)
Does not create a new Dn but alters existing Dn by using the first
short name for an attributeType definition.
|
void |
destroy()
This method does nothing by default.
|
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. |
void |
move(MoveOperationContext moveContext)
Filters
Partition#move( MoveOperationContext ) call. |
void |
moveAndRename(MoveAndRenameOperationContext moveAndRenameContext)
Filters
Partition#moveAndRename( MoveAndRenameOperationContext) call. |
void |
rename(RenameOperationContext renameContext)
Filters
Partition#rename( RenameOperationContext ) call. |
EntryFilteringCursor |
search(SearchOperationContext searchContext)
Filters
Partition#search( SearchOperationContext ) call. |
private static final org.slf4j.Logger LOG
private final EntryFilter denormalizingSearchFilter
private final EntryFilter operationalAttributeSearchFilter
private org.apache.directory.api.ldap.model.name.Dn subschemaSubentryDn
private org.apache.directory.api.ldap.model.name.Dn adminDn
public OperationalAttributeInterceptor()
public void init(DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
BaseInterceptorinit in interface Interceptorinit in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionpublic void destroy()
BaseInterceptordestroy in interface Interceptordestroy in class BaseInterceptorprivate boolean checkAddOperationalAttribute(boolean isAdmin,
org.apache.directory.api.ldap.model.entry.Entry entry,
org.apache.directory.api.ldap.model.schema.AttributeType attribute)
throws org.apache.directory.api.ldap.model.exception.LdapException
org.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 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.LdapExceptionpublic void delete(DeleteOperationContext deleteContext) throws org.apache.directory.api.ldap.model.exception.LdapException
BaseInterceptorPartition#delete( DeleteOperationContext ) call.delete in interface Interceptordelete in class BaseInterceptororg.apache.directory.api.ldap.model.exception.LdapExceptionprivate void denormalizeEntryOpAttrs(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 org.apache.directory.api.ldap.model.name.Dn denormalizeTypes(org.apache.directory.api.ldap.model.name.Dn dn)
throws org.apache.directory.api.ldap.model.exception.LdapException
dn - the normalized distinguished namejava.lang.Exception - if there are problems denormalizingorg.apache.directory.api.ldap.model.exception.LdapException