org.opends.server.types.operation
Interface PreOperationOperation

All Superinterfaces:
PluginOperation
All Known Subinterfaces:
PreOperationAddOperation, PreOperationBindOperation, PreOperationCompareOperation, PreOperationDeleteOperation, PreOperationExtendedOperation, PreOperationModifyDNOperation, PreOperationModifyOperation, PreOperationSearchOperation
All Known Implementing Classes:
ExtendedOperationBasis, LocalBackendAddOperation, LocalBackendBindOperation, LocalBackendCompareOperation, LocalBackendDeleteOperation, LocalBackendModifyDNOperation, LocalBackendModifyOperation, LocalBackendSearchOperation

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
public interface PreOperationOperation
extends PluginOperation

This class defines a set of methods that are available for use by pre-operation plugins for all types of operations. Note that this interface is intended only to define an API for use by plugins and is not intended to be implemented by any custom classes.


Method Summary
 void addResponseControl(Control control)
          Adds the provided control to the set of controls to include in the response to the client.
 void appendAdditionalLogMessage(Message message)
          Appends the provided message to the additional log information for this operation.
 void appendErrorMessage(Message message)
          Appends the provided message to the error message buffer.
 MessageBuilder getAdditionalLogMessage()
          Retrieves the additional log message for this operation, which should be written to the log but not included in the response to the client.
 DN getAuthorizationDN()
          Retrieves the authorization DN for this operation.
 MessageBuilder getErrorMessage()
          Retrieves the error message for this operation.
 void removeResponseControl(Control control)
          Removes the provided control from the set of controls to include in the response to the client.
 void setAdditionalLogMessage(MessageBuilder additionalLogMessage)
          Specifies the additional log message for this operation, which should be written to the log but not included in the response to the client.
 void setErrorMessage(MessageBuilder errorMessage)
          Specifies the error message for this operation.
 
Methods inherited from interface org.opends.server.types.operation.PluginOperation
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getOperationType, getProcessingStartTime, getRequestControls, getResponseControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString, toString
 

Method Detail

addResponseControl

void addResponseControl(Control control)
Adds the provided control to the set of controls to include in the response to the client.

Parameters:
control - The control to add to the set of controls to include in the response to the client.

removeResponseControl

void removeResponseControl(Control control)
Removes the provided control from the set of controls to include in the response to the client.

Parameters:
control - The control to remove from the set of controls to include in the response to the client.

getErrorMessage

MessageBuilder getErrorMessage()
Retrieves the error message for this operation. Its contents may be altered by the caller.

Returns:
The error message for this operation.

setErrorMessage

void setErrorMessage(MessageBuilder errorMessage)
Specifies the error message for this operation.

Parameters:
errorMessage - The error message for this operation.

appendErrorMessage

void appendErrorMessage(Message message)
Appends the provided message to the error message buffer. If the buffer has not yet been created, then this will create it first and then add the provided message.

Parameters:
message - The message to append to the error message buffer.

getAdditionalLogMessage

MessageBuilder getAdditionalLogMessage()
Retrieves the additional log message for this operation, which should be written to the log but not included in the response to the client. The contents of this buffer may be altered by the caller.

Returns:
The additional log message for this operation.

setAdditionalLogMessage

void setAdditionalLogMessage(MessageBuilder additionalLogMessage)
Specifies the additional log message for this operation, which should be written to the log but not included in the response to the client.

Parameters:
additionalLogMessage - The additional log message for this

appendAdditionalLogMessage

void appendAdditionalLogMessage(Message message)
Appends the provided message to the additional log information for this operation.

Parameters:
message - The message that should be appended to the additional log information for this operation.

getAuthorizationDN

DN getAuthorizationDN()
Retrieves the authorization DN for this operation. In many cases, it will be the same as the DN of the authenticated user for the underlying connection, or the null DN if no authentication has been performed on that connection. However, it may be some other value if special processing has been requested (e.g., the operation included a proxied authorization control).

Returns:
The authorization DN for this operation.