Spring LDAP

org.springframework.ldap.transaction.compensating
Class ModifyAttributesOperationRecorder

java.lang.Object
  extended by org.springframework.ldap.transaction.compensating.ModifyAttributesOperationRecorder
All Implemented Interfaces:
CompensatingTransactionOperationRecorder

public class ModifyAttributesOperationRecorder
extends Object
implements CompensatingTransactionOperationRecorder

A CompensatingTransactionOperationRecorder keeping track of modifyAttributes operations, creating corresponding ModifyAttributesOperationExecutor instances for rollback.

Since:
1.2
Author:
Mattias Hellborg Arthursson

Constructor Summary
ModifyAttributesOperationRecorder(LdapOperations ldapOperations)
           
 
Method Summary
protected  ModificationItem getCompensatingModificationItem(Attributes originalAttributes, ModificationItem modificationItem)
          Get a ModificationItem to use for rollback of the supplied modification.
 CompensatingTransactionOperationExecutor recordOperation(Object[] args)
          Record information about the operation performed and return a corresponding CompensatingTransactionOperationExecutor to be used if the operation would need to be rolled back.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifyAttributesOperationRecorder

public ModifyAttributesOperationRecorder(LdapOperations ldapOperations)
Method Detail

recordOperation

public CompensatingTransactionOperationExecutor recordOperation(Object[] args)
Description copied from interface: CompensatingTransactionOperationRecorder
Record information about the operation performed and return a corresponding CompensatingTransactionOperationExecutor to be used if the operation would need to be rolled back.

Specified by:
recordOperation in interface CompensatingTransactionOperationRecorder
Parameters:
args - The arguments that have been sent to the operation.
Returns:
A CompensatingTransactionOperationExecutor to be used if the recorded operation should need to be rolled back.

getCompensatingModificationItem

protected ModificationItem getCompensatingModificationItem(Attributes originalAttributes,
                                                           ModificationItem modificationItem)
Get a ModificationItem to use for rollback of the supplied modification.

Parameters:
originalAttributes - All Attributes of the target DN that are affected of any of the ModificationItems.
modificationItem - the ModificationItem to create a rollback item for.
Returns:
A ModificationItem to use for rollback of the supplied ModificationItem.

Spring LDAP