Package org.opends.server.core
Class CompareOperationBasis
- java.lang.Object
-
- org.opends.server.types.AbstractOperation
-
- org.opends.server.core.CompareOperationBasis
-
- All Implemented Interfaces:
Runnable,CompareOperation,Operation,PluginOperation,PostResponseCompareOperation,PostResponseOperation,PreParseCompareOperation,PreParseOperation
public class CompareOperationBasis extends AbstractOperation implements PreParseCompareOperation, CompareOperation, PostResponseCompareOperation
This class defines an operation that may be used to determine whether a specified entry in the Directory Server contains a given attribute-value pair.
-
-
Field Summary
-
Fields inherited from class org.opends.server.types.AbstractOperation
cancelRequest, cancelResult, clientConnection, messageID, NO_RESPONSE_CONTROLS, operationID
-
Fields inherited from interface org.opends.server.types.Operation
LOCALBACKENDOPERATIONS
-
-
Constructor Summary
Constructors Constructor Description CompareOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, ByteString rawEntryDN, String rawAttributeType, ByteString assertionValue)Creates a new compare operation with the provided information.CompareOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, DN entryDN, AttributeDescription attributeDescription, ByteString assertionValue)Creates a new compare operation with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResponseControl(Control control)Adds the provided control to the set of controls to include in the response to the client.ByteStringgetAssertionValue()Retrieves the assertion value for this compare operation.AttributeDescriptiongetAttributeDescription()Retrieves the attribute description for this compare operation.DNgetEntryDN()Retrieves the DN of the entry to compare.EntrygetEntryToCompare()Retrieves the entry to target with the compare operation.OperationTypegetOperationType()Retrieves the operation type for this operation.DNgetProxiedAuthorizationDN()Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.StringgetRawAttributeType()Retrieves the raw attribute type for this compare operation.ByteStringgetRawEntryDN()Retrieves the raw, unprocessed entry DN as included in the client request.List<Control>getResponseControls()Retrieves the set of controls to include in the response to the client.voidremoveResponseControl(Control control)Removes the provided control from the set of controls to include in the response to the client.voidrun()Performs the work of actually processing this operation.voidsetAssertionValue(ByteString assertionValue)Specifies the assertion value for this compare operation.voidsetProxiedAuthorizationDN(DN proxiedAuthorizationDN)Specifies the proxied authorization target DN for this compare operation.voidsetRawAttributeType(String rawAttributeType)Specifies the raw attribute type for this compare operation.voidsetRawEntryDN(ByteString rawEntryDN)Specifies the raw, unprocessed entry DN as included in the client request.voidtoString(StringBuilder buffer)Appends a string representation of this operation to the provided buffer.voidupdateOperationErrMsgAndResCode()Updates the error message and the result code of the operation.-
Methods inherited from class org.opends.server.types.AbstractOperation
abort, addAdditionalLogItem, addRequestControl, appendErrorMessage, appendMaskedErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, equals, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getConnectionID, getErrorMessage, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, getTransactionId, hashCode, invokePostResponseCallbacks, isInnerOperation, isInternalOperation, isSynchronizationOperation, operationCompleted, processOperationResult, processOperationResult, registerPostResponseCallback, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setProcessingStartTime, setProcessingStopTime, 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, addAdditionalLogItem, addRequestControl, appendErrorMessage, appendMaskedErrorMessage, cancel, checkIfCanceled, disconnectClient, dontSynchronize, getAdditionalLogItems, getAttachment, getAttachments, getAuthorizationDN, getAuthorizationEntry, getCancelRequest, getCancelResult, getClientConnection, getConnectionID, getErrorMessage, getMaskedErrorMessage, getMaskedResultCode, getMatchedDN, getMessageID, getOperationID, getProcessingNanoTime, getProcessingStartTime, getProcessingStopTime, getProcessingTime, getReferralURLs, getRequestControl, getRequestControls, getResultCode, isInnerOperation, isInternalOperation, isSynchronizationOperation, operationCompleted, registerPostResponseCallback, removeAttachment, setAttachment, setAttachments, setAuthorizationEntry, setDontSynchronize, setErrorMessage, setInnerOperation, setInternalOperation, setMaskedErrorMessage, setMaskedResultCode, setMatchedDN, setReferralURLs, setResponseData, setResultCode, setSynchronizationOperation, toString
-
Methods inherited from interface org.opends.server.types.operation.PluginOperation
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControl, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString
-
Methods inherited from interface org.opends.server.types.operation.PostResponseOperation
getAdditionalLogItems, getAuthorizationDN, getErrorMessage, getMatchedDN, getProcessingStopTime, getProcessingTime, getReferralURLs, getResultCode
-
Methods inherited from interface org.opends.server.types.operation.PreParseOperation
addAdditionalLogItem, addRequestControl, appendErrorMessage, getAdditionalLogItems, getErrorMessage, setErrorMessage
-
-
-
-
Constructor Detail
-
CompareOperationBasis
public CompareOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, ByteString rawEntryDN, String rawAttributeType, ByteString assertionValue)
Creates a new compare operation with the provided information.- Parameters:
clientConnection- The client connection with which this operation is associated.operationID- The operation ID for this operation.messageID- The message ID of the request with which this operation is associated.requestControls- The set of controls included in the request.rawEntryDN- The raw, unprocessed entry DN as provided in the client request. This may or may not be a valid DN as no validation will have been performed yet.rawAttributeType- The raw attribute type for the compare operation.assertionValue- The assertion value for the compare operation.
-
CompareOperationBasis
public CompareOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, DN entryDN, AttributeDescription attributeDescription, ByteString assertionValue)
Creates a new compare operation with the provided information.- Parameters:
clientConnection- The client connection with which this operation is associated.operationID- The operation ID for this operation.messageID- The message ID of the request with which this operation is associated.requestControls- The set of controls included in the request.entryDN- The entry DN for this compare operation.attributeDescription- The attribute description for this compare operation.assertionValue- The assertion value for the compare operation.
-
-
Method Detail
-
getRawEntryDN
public final ByteString getRawEntryDN()
Description copied from interface:PreParseCompareOperationRetrieves the raw, unprocessed entry DN as included in the client request.- Specified by:
getRawEntryDNin interfaceCompareOperation- Specified by:
getRawEntryDNin interfacePostResponseCompareOperation- Specified by:
getRawEntryDNin interfacePreParseCompareOperation- Returns:
- The raw, unprocessed entry DN as included in the client request.
-
setRawEntryDN
public final void setRawEntryDN(ByteString rawEntryDN)
Description copied from interface:PreParseCompareOperationSpecifies the raw, unprocessed entry DN as included in the client request.- Specified by:
setRawEntryDNin interfaceCompareOperation- Specified by:
setRawEntryDNin interfacePreParseCompareOperation- Parameters:
rawEntryDN- The raw entry DN for this compare operation.
-
getEntryDN
public final DN getEntryDN()
Description copied from interface:CompareOperationRetrieves the DN of the entry to compare. This should not be called by pre-parse plugins because the processed DN will not be available yet. Instead, they should call thegetRawEntryDNmethod.- Specified by:
getEntryDNin interfaceCompareOperation- Specified by:
getEntryDNin interfacePostResponseCompareOperation- Returns:
- The DN of the entry to compare, or
nullif the raw entry DN has not yet been processed.
-
getRawAttributeType
public final String getRawAttributeType()
Description copied from interface:PreParseCompareOperationRetrieves the raw attribute type for this compare operation.- Specified by:
getRawAttributeTypein interfaceCompareOperation- Specified by:
getRawAttributeTypein interfacePostResponseCompareOperation- Specified by:
getRawAttributeTypein interfacePreParseCompareOperation- Returns:
- The raw attribute type for this compare operation.
-
setRawAttributeType
public final void setRawAttributeType(String rawAttributeType)
Description copied from interface:PreParseCompareOperationSpecifies the raw attribute type for this compare operation.- Specified by:
setRawAttributeTypein interfaceCompareOperation- Specified by:
setRawAttributeTypein interfacePreParseCompareOperation- Parameters:
rawAttributeType- The raw attribute type for this compare operation.
-
getAttributeDescription
public final AttributeDescription getAttributeDescription()
Description copied from interface:CompareOperationRetrieves the attribute description for this compare operation. This should not be called by pre-parse plugins because the processed attribute description will not be available yet.- Specified by:
getAttributeDescriptionin interfaceCompareOperation- Specified by:
getAttributeDescriptionin interfacePostResponseCompareOperation- Returns:
- The attribute description for this compare operation.
-
getAssertionValue
public final ByteString getAssertionValue()
Description copied from interface:PreParseCompareOperationRetrieves the assertion value for this compare operation.- Specified by:
getAssertionValuein interfaceCompareOperation- Specified by:
getAssertionValuein interfacePostResponseCompareOperation- Specified by:
getAssertionValuein interfacePreParseCompareOperation- Returns:
- The assertion value for this compare operation.
-
setAssertionValue
public final void setAssertionValue(ByteString assertionValue)
Description copied from interface:PreParseCompareOperationSpecifies the assertion value for this compare operation.- Specified by:
setAssertionValuein interfaceCompareOperation- Specified by:
setAssertionValuein interfacePreParseCompareOperation- Parameters:
assertionValue- The assertion value for this compare operation.
-
getOperationType
public final OperationType getOperationType()
Description copied from interface:PluginOperationRetrieves the operation type for this operation.- Specified by:
getOperationTypein interfaceOperation- Specified by:
getOperationTypein interfacePluginOperation- Returns:
- The operation type for this operation.
-
getProxiedAuthorizationDN
public DN getProxiedAuthorizationDN()
Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.- Specified by:
getProxiedAuthorizationDNin interfaceCompareOperation- Specified by:
getProxiedAuthorizationDNin interfaceOperation- Returns:
- The proxied authorization DN for this operation if proxied
authorization has been requested, or
nullif proxied authorization has not been requested.
-
setProxiedAuthorizationDN
public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
Description copied from interface:CompareOperationSpecifies the proxied authorization target DN for this compare operation.- Specified by:
setProxiedAuthorizationDNin interfaceCompareOperation- Specified by:
setProxiedAuthorizationDNin interfaceOperation- Parameters:
proxiedAuthorizationDN- The proxied authorization target DN for this compare operation
-
getResponseControls
public final List<Control> getResponseControls()
Description copied from interface:PluginOperationRetrieves the set of controls to include in the response to the client. The contents of this list must not be altered.- Specified by:
getResponseControlsin interfaceOperation- Specified by:
getResponseControlsin interfacePluginOperation- Returns:
- The set of controls to include in the response to the client.
-
addResponseControl
public final void addResponseControl(Control control)
Description copied from interface:PreParseOperationAdds the provided control to the set of controls to include in the response to the client.- Specified by:
addResponseControlin interfaceOperation- Specified by:
addResponseControlin interfacePreParseOperation- Parameters:
control- The control to add to the set of controls to include in the response to the client.
-
removeResponseControl
public final void removeResponseControl(Control control)
Description copied from interface:PreParseOperationRemoves the provided control from the set of controls to include in the response to the client.- Specified by:
removeResponseControlin interfaceOperation- Specified by:
removeResponseControlin interfacePreParseOperation- Parameters:
control- The control to remove from the set of controls to include in the response to the client.
-
run
public final void run()
Performs the work of actually processing this operation. This should include all processing for the operation, including invoking plugins, logging messages, performing access control, managing synchronization, and any other work that might need to be done in the course of processing.
-
updateOperationErrMsgAndResCode
public void updateOperationErrMsgAndResCode()
Updates the error message and the result code of the operation. This method is called because no workflow was found to process the operation.- Overrides:
updateOperationErrMsgAndResCodein classAbstractOperation
-
toString
public final void toString(StringBuilder buffer)
Description copied from interface:PluginOperationAppends a string representation of this operation to the provided buffer.- Specified by:
toStringin interfaceOperation- Specified by:
toStringin interfacePluginOperation- Parameters:
buffer- The buffer into which a string representation of this operation should be appended.
-
getEntryToCompare
public Entry getEntryToCompare()
Retrieves the entry to target with the compare operation. This method always returns null.- Specified by:
getEntryToComparein interfacePostResponseCompareOperation- Returns:
- The entry to target with the compare operation.
-
-