org.opends.server.core
Class ModifyOperationWrapper

java.lang.Object
  extended by org.opends.server.core.OperationWrapper
      extended by org.opends.server.core.ModifyOperationWrapper
All Implemented Interfaces:
ModifyOperation, Operation
Direct Known Subclasses:
LocalBackendModifyOperation

public abstract class ModifyOperationWrapper
extends OperationWrapper
implements ModifyOperation

This abstract class wraps/decorates a given modify operation. This class will be extended by sub-classes to enhance the functionnality of the ModifyOperationBasis.


Field Summary
 
Fields inherited from interface org.opends.server.types.Operation
LOCALBACKENDOPERATIONS
 
Constructor Summary
protected ModifyOperationWrapper(ModifyOperation modify)
          Creates a new modify operation based on the provided modify operation.
 
Method Summary
 void addModification(Modification modification)
          Adds the provided modification to the set of modifications to this modify operation.
 void addRawModification(RawModification rawModification)
          Adds the provided modification to the set of raw modifications for this modify operation.
 boolean equals(java.lang.Object obj)
          
 long getChangeNumber()
          Retrieves the change number that has been assigned to this operation.
 DN getEntryDN()
          Retrieves the DN of the entry to modify.
 java.util.List<Modification> getModifications()
          Retrieves the set of modifications for this modify operation.
 DN getProxiedAuthorizationDN()
          Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.
 ByteString getRawEntryDN()
          Retrieves the raw, unprocessed entry DN as included in the client request.
 java.util.List<RawModification> getRawModifications()
          Retrieves the set of raw, unprocessed modifications as included in the client request.
 int hashCode()
          
 void setChangeNumber(long changeNumber)
          Specifies the change number that has been assigned to this operation by the synchronization mechanism.
 void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
          Set the proxied authorization DN for this operation if proxied authorization has been requested.
 void setRawEntryDN(ByteString rawEntryDN)
          Specifies the raw, unprocessed entry DN as included in the client request.
 void setRawModifications(java.util.List<RawModification> rawModifications)
          Specifies the raw modifications for this modify operation.
 java.lang.String toString()
          Retrieves a string representation of this operation.
 
Methods inherited from class org.opends.server.core.OperationWrapper
abort, addRequestControl, addResponseControl, appendAdditionalLogMessage, appendErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, getAdditionalLogMessage, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getCommonLogElements, getConnectionID, getErrorMessage, getMatchedDN, getMessageID, getOperationID, getOperationType, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControls, getRequestLogElements, getResponseControls, getResponseLogElements, getResultCode, isInternalOperation, isSynchronizationOperation, operationCompleted, removeAttachment, removeRequestControl, removeResponseControl, setAdditionalLogMessage, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInternalOperation, setMatchedDN, setReferralURLs, setResponseData, setResultCode, setSynchronizationOperation, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opends.server.types.Operation
abort, addRequestControl, addResponseControl, appendAdditionalLogMessage, appendErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, getAdditionalLogMessage, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getCommonLogElements, getConnectionID, getErrorMessage, getMatchedDN, getMessageID, getOperationID, getOperationType, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControls, getRequestLogElements, getResponseControls, getResponseLogElements, getResultCode, isInternalOperation, isSynchronizationOperation, operationCompleted, removeAttachment, removeRequestControl, removeResponseControl, setAdditionalLogMessage, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInternalOperation, setMatchedDN, setReferralURLs, setResponseData, setResultCode, setSynchronizationOperation, toString
 

Constructor Detail

ModifyOperationWrapper

protected ModifyOperationWrapper(ModifyOperation modify)
Creates a new modify operation based on the provided modify operation.

Parameters:
modify - The modify operation to wrap
Method Detail

addModification

public void addModification(Modification modification)
                     throws DirectoryException
Adds the provided modification to the set of modifications to this modify operation. This may only be called by pre-operation plugins.

Specified by:
addModification in interface ModifyOperation
Parameters:
modification - The modification to add to the set of changes for this modify operation.
Throws:
DirectoryException - If an unexpected problem occurs while applying the modification to the entry.

addRawModification

public void addRawModification(RawModification rawModification)
Adds the provided modification to the set of raw modifications for this modify operation. This must only be called by pre-parse plugins.

Specified by:
addRawModification in interface ModifyOperation
Parameters:
rawModification - The modification to add to the set of raw modifications for this modify operation.

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

getEntryDN

public DN getEntryDN()
Retrieves the DN of the entry to modify. This should not be called by pre-parse plugins because the processed DN will not be available yet. Instead, they should call the getRawEntryDN method.

Specified by:
getEntryDN in interface ModifyOperation
Returns:
The DN of the entry to modify, or null if the raw entry DN has not yet been processed.

getModifications

public java.util.List<Modification> getModifications()
Retrieves the set of modifications for this modify operation. Its contents should not be altered. It will not be available to pre-parse plugins.

Specified by:
getModifications in interface ModifyOperation
Returns:
The set of modifications for this modify operation, or null if the modifications have not yet been processed.

getRawEntryDN

public ByteString getRawEntryDN()
Retrieves the raw, unprocessed entry DN as included in the client request. The DN that is returned may or may not be a valid DN, since no validation will have been performed upon it.

Specified by:
getRawEntryDN in interface ModifyOperation
Returns:
The raw, unprocessed entry DN as included in the client request.

getRawModifications

public java.util.List<RawModification> getRawModifications()
Retrieves the set of raw, unprocessed modifications as included in the client request. Note that this may contain one or more invalid modifications, as no validation will have been performed on this information. The list returned must not be altered by the caller.

Specified by:
getRawModifications in interface ModifyOperation
Returns:
The set of raw, unprocessed modifications as included in the client request.

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

setRawEntryDN

public void setRawEntryDN(ByteString rawEntryDN)
Specifies the raw, unprocessed entry DN as included in the client request. This should only be called by pre-parse plugins.

Specified by:
setRawEntryDN in interface ModifyOperation
Parameters:
rawEntryDN - The raw, unprocessed entry DN as included in the client request.

setRawModifications

public void setRawModifications(java.util.List<RawModification> rawModifications)
Specifies the raw modifications for this modify operation.

Specified by:
setRawModifications in interface ModifyOperation
Parameters:
rawModifications - The raw modifications for this modify operation.

toString

public java.lang.String toString()
Retrieves a string representation of this operation.

Specified by:
toString in interface Operation
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this operation.

getChangeNumber

public final long getChangeNumber()
Retrieves the change number that has been assigned to this operation.

Specified by:
getChangeNumber in interface ModifyOperation
Returns:
The change number that has been assigned to this operation, or -1 if none has been assigned yet or if there is no applicable synchronization mechanism in place that uses change numbers.

setChangeNumber

public void setChangeNumber(long changeNumber)
Specifies the change number that has been assigned to this operation by the synchronization mechanism.

Specified by:
setChangeNumber in interface ModifyOperation
Parameters:
changeNumber - The change number that has been assigned to this operation by the synchronization mechanism.

getProxiedAuthorizationDN

public DN getProxiedAuthorizationDN()
Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.

Specified by:
getProxiedAuthorizationDN in interface ModifyOperation
Returns:
The proxied authorization DN for this operation if proxied authorization has been requested, or null if proxied authorization has not been requested.

setProxiedAuthorizationDN

public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
Set the proxied authorization DN for this operation if proxied authorization has been requested.

Specified by:
setProxiedAuthorizationDN in interface ModifyOperation
Parameters:
proxiedAuthorizationDN - The proxied authorization DN for this operation if proxied authorization has been requested, or null if proxied authorization has not been requested.