Interface PostOperationOperation
- All Superinterfaces:
PluginOperation
- All Known Subinterfaces:
PostOperationAbandonOperation,PostOperationAddOperation,PostOperationBindOperation,PostOperationCompareOperation,PostOperationDeleteOperation,PostOperationExtendedOperation,PostOperationModifyDNOperation,PostOperationModifyOperation,PostOperationSearchOperation,PostOperationUnbindOperation,PostResponseBindOperation,PostResponseExtendedOperation
- All Known Implementing Classes:
AbandonOperation,AddOperation,BindOperation,CompareOperation,DeleteOperation,ExtendedOperation,ModifyDnOperation,ModifyOperation,SearchOperation,UnbindOperation
This class defines a set of methods that are available for use by post-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
Modifier and TypeMethodDescriptionvoidAdds an additional log item to this operation, which should be written to the log but not included in the response to the client.voidaddResponseControl(Control control) Adds the provided control to the set of controls to include in the response to the client.voidappendErrorMessage(LocalizableMessage message) Appends the provided message to the error message buffer.Returns an unmodifiable list containing the additional log items for this operation, which should be written to the log but not included in the response to the client.Retrieves the authorization DN for this operation.Retrieves the error message for this operation.Retrieves the matched DN for this operation.Retrieves the set of referral URLs for this operation.Retrieves the result code for this operation.voidremoveResponseControl(Control control) Removes the provided control from the set of controls to include in the response to the client.voidsetErrorMessage(LocalizableMessageBuilder errorMessage) Specifies the error message for this operation.voidsetMatchedDN(Dn matchedDN) Specifies the matched DN for this operation.voidsetReferralURLs(List<String> referralURLs) Specifies the set of referral URLs for this operation.voidSets the response elements for this operation based on the information contained in the providedexceptionobject.voidsetResultCode(ResultCode resultCode) Specifies the result code for this operation.Methods inherited from interface org.opends.server.types.operation.PluginOperation
checkIfCanceled, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getRequest, getRequestControl, getRequestControl, getRequestControls, getResponseControls, hasPrivilege, isInternalOperation, isSynchronizationOperation, setAttachment, toString, toString
-
Method Details
-
addResponseControl
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
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.
-
getResultCode
ResultCode getResultCode()Retrieves the result code for this operation.- Returns:
- The result code associated for this operation, or
UNDEFINEDif the operation has not yet completed.
-
setResultCode
Specifies the result code for this operation.- Parameters:
resultCode- The result code for this operation.
-
getErrorMessage
LocalizableMessageBuilder getErrorMessage()Retrieves the error message for this operation. Its contents may be altered by the caller.- Returns:
- The error message for this operation.
-
setErrorMessage
Specifies the error message for this operation.- Parameters:
errorMessage- The error message for this operation.
-
appendErrorMessage
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
-
getMatchedDN
Dn getMatchedDN()Retrieves the matched DN for this operation.- Returns:
- The matched DN for this operation, or
nullif the operation has not yet completed or does not have a matched DN.
-
setMatchedDN
Specifies the matched DN for this operation.- Parameters:
matchedDN- The matched DN for this operation.
-
getReferralURLs
Retrieves the set of referral URLs for this operation. Its contents must not be altered by the caller.- Returns:
- The set of referral URLs for this operation, or
nullif the operation is not yet complete or does not have a set of referral URLs.
-
setReferralURLs
Specifies the set of referral URLs for this operation.- Parameters:
referralURLs- The set of referral URLs for this operation.
-
setResult
Sets the response elements for this operation based on the information contained in the providedexceptionobject.- Parameters:
e- The exception containing the information to use for the response elements.
-
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.
-
getAdditionalLogItems
List<AdditionalLogItem> getAdditionalLogItems()Returns an unmodifiable list containing the additional log items for this operation, which should be written to the log but not included in the response to the client.- Returns:
- An unmodifiable list containing the additional log items for this operation.
-
addAdditionalLogItem
Adds an additional log item to this operation, which should be written to the log but not included in the response to the client. This method may not be called by post-response plugins.- Parameters:
item- The additional log item for this operation.
-