public class TriggerInterceptor extends BaseInterceptor
| Modifier and Type | Field and Description |
|---|---|
private boolean |
enabled
whether or not this interceptor is activated
|
private static java.lang.String |
ENTRY_TRIGGER_ATTR
the entry trigger attribute string: entryTrigger
|
private static org.slf4j.Logger |
LOG
the logger for this class
|
private StoredProcExecutionManager |
manager |
private static SubentryUtils |
subentryUtils
The SubentryUtils instance
|
private TriggerExecutionAuthorizer |
triggerExecutionAuthorizer
a Trigger Execution Authorizer
|
private org.apache.directory.api.ldap.trigger.TriggerSpecificationParser |
triggerParser
a normalizing Trigger Specification parser
|
private TriggerSpecCache |
triggerSpecCache
a triggerSpecCache that responds to add, delete, and modify attempts
|
directoryService, dnFactory, PWD_POLICY_STATE_ATTRIBUTE_TYPES, schemaManager| Constructor and Description |
|---|
TriggerInterceptor()
Creates a new instance of a TriggerInterceptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(AddOperationContext addContext)
Filters
Partition#add( AddOperationContext ) call. |
private void |
addEntryTriggerSpecs(java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs,
org.apache.directory.api.ldap.model.entry.Entry entry)
Adds the set of entryTriggers to a collection of trigger specifications.
|
private void |
addPrescriptiveTriggerSpecs(OperationContext opContext,
java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs,
org.apache.directory.api.ldap.model.name.Dn dn,
org.apache.directory.api.ldap.model.entry.Entry entry)
Adds prescriptiveTrigger TriggerSpecificaitons to a collection of
TriggerSpeficaitions by accessing the triggerSpecCache.
|
void |
delete(DeleteOperationContext deleteContext)
Filters
Partition#delete( DeleteOperationContext ) call. |
private java.lang.Object |
executeProcedure(OperationContext opContext,
java.lang.String procedure,
java.lang.Object[] values) |
private java.lang.Object |
executeTrigger(OperationContext opContext,
org.apache.directory.api.ldap.trigger.TriggerSpecification tsec,
StoredProcedureParameterInjector injector) |
private java.lang.Object |
executeTriggers(OperationContext opContext,
java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs,
StoredProcedureParameterInjector injector) |
java.util.Map<org.apache.directory.api.ldap.trigger.ActionTime,java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification>> |
getActionTimeMappedTriggerSpecsForOperation(java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs,
org.apache.directory.api.ldap.trigger.LdapOperation ldapOperation)
Return a selection of trigger specifications for a certain type of trigger action time.
|
void |
init(DirectoryService directoryService)
This method does nothing by default.
|
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. |
private static final org.slf4j.Logger LOG
private static final java.lang.String ENTRY_TRIGGER_ATTR
private TriggerSpecCache triggerSpecCache
private org.apache.directory.api.ldap.trigger.TriggerSpecificationParser triggerParser
private boolean enabled
private TriggerExecutionAuthorizer triggerExecutionAuthorizer
private StoredProcExecutionManager manager
private static SubentryUtils subentryUtils
public TriggerInterceptor()
private void addPrescriptiveTriggerSpecs(OperationContext opContext, java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs, 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
triggerSpecs - the collection of trigger specifications to add todn - the normalized distinguished name of the entryentry - the target entry that is considered as the trigger sourceproxy - the partition nexus proxyjava.lang.Exception - if there are problems accessing attribute valuesorg.apache.directory.api.ldap.model.exception.LdapExceptionprivate void addEntryTriggerSpecs(java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs,
org.apache.directory.api.ldap.model.entry.Entry entry)
throws org.apache.directory.api.ldap.model.exception.LdapException
triggerSpecs - the collection of trigger specifications to add toentry - the target entry that is considered as the trigger sourcejava.lang.Exception - if there are problems accessing attribute valuesorg.apache.directory.api.ldap.model.exception.LdapExceptionpublic java.util.Map<org.apache.directory.api.ldap.trigger.ActionTime,java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification>> getActionTimeMappedTriggerSpecsForOperation(java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs,
org.apache.directory.api.ldap.trigger.LdapOperation ldapOperation)
triggerSpecs - the trigger specificationsldapOperation - the ldap operation being performedpublic 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 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 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 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.LdapExceptionprivate java.lang.Object executeTriggers(OperationContext opContext, java.util.List<org.apache.directory.api.ldap.trigger.TriggerSpecification> triggerSpecs, StoredProcedureParameterInjector injector) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate java.lang.Object executeTrigger(OperationContext opContext, org.apache.directory.api.ldap.trigger.TriggerSpecification tsec, StoredProcedureParameterInjector injector) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapExceptionprivate java.lang.Object executeProcedure(OperationContext opContext, java.lang.String procedure, java.lang.Object[] values) throws org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.exception.LdapException