Package org.opends.server.core
Class SearchOperationBasis
- java.lang.Object
-
- org.opends.server.types.AbstractOperation
-
- org.opends.server.core.SearchOperationBasis
-
- All Implemented Interfaces:
Runnable,SearchOperation,Operation,InProgressOperation,PluginOperation,PostResponseOperation,PostResponseSearchOperation,PreParseOperation,PreParseSearchOperation,SearchEntrySearchOperation,SearchReferenceSearchOperation
- Direct Known Subclasses:
InternalSearchOperation
public class SearchOperationBasis extends AbstractOperation implements PreParseSearchOperation, PostResponseSearchOperation, SearchEntrySearchOperation, SearchReferenceSearchOperation, SearchOperation
This class defines an operation that may be used to locate entries in the Directory Server based on a given set of criteria.
-
-
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 SearchOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, ByteString rawBaseDN, SearchScope scope, DereferenceAliasesPolicy derefPolicy, int sizeLimit, int timeLimit, boolean typesOnly, RawFilter rawFilter, Set<String> attributes)Creates a new search operation with the provided information.SearchOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, DN baseDN, SearchScope scope, DereferenceAliasesPolicy derefPolicy, int sizeLimit, int timeLimit, boolean typesOnly, SearchFilter filter, Set<String> attributes)Creates a new search operation with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort(CancelRequest cancelRequest)Attempts to abort this operation before processing has completed.voidaddResponseControl(Control control)Adds the provided control to the set of controls to include in the response to the client.voidendSearchPhase()Indicates that the search phase is over and that any further entry comes from a persistent search.Set<String>getAttributes()Retrieves the set of requested attributes for this search operation.DNgetBaseDN()Retrieves the base DN for this search operation.DereferenceAliasesPolicygetDerefPolicy()Retrieves the alias dereferencing policy for this search operation.intgetEntriesSent()Retrieves the number of entries sent to the client for this search operation.SearchFiltergetFilter()Retrieves the filter for this search operation.MatchedValuesControlgetMatchedValuesControl()The matched values control associated with this search operation.OperationTypegetOperationType()Retrieves the operation type for this operation.DNgetProxiedAuthorizationDN()Retrieves the proxied authorization DN for this operation if proxied authorization has been requested.ByteStringgetRawBaseDN()Retrieves the raw, unprocessed base DN as included in the request from the client.RawFiltergetRawFilter()Retrieves the raw, unprocessed search filter as included in the request from the client.intgetReferencesSent()Retrieves the number of search references sent to the client for this search operation.List<Control>getResponseControls()Retrieves the set of controls to include in the response to the client.SearchScopegetScope()Retrieves the scope for this search operation.intgetSizeLimit()Retrieves the size limit for this search operation.intgetTimeLimit()Retrieves the time limit for this search operation.longgetTimeLimitExpiration()Get the time after which the search time limit has expired.booleangetTypesOnly()Retrieves the typesOnly flag for this search operation.booleanisClientAcceptsReferrals()Indicates whether the client is able to handle referrals.booleanisIncludeUsableControl()Indicates whether to include the account usable response control with search result entries or not.booleanisRealAttributesOnly()Returns true if only real attributes should be returned.booleanisReturnSubentriesOnly()Indicates whether LDAP subentries should be returned or not.booleanisSendResponse()Indicates whether the search result done message has to be sent to the client, or not.booleanisVirtualAttributesOnly()Returns true if only virtual attributes should be returned.voidremoveResponseControl(Control control)Removes the provided control from the set of controls to include in the response to the client.booleanreturnEntry(Entry entry, List<Control> controls)Returns the provided entry to the client.booleanreturnEntry(Entry entry, List<Control> controls, boolean evaluateAci)Used as a callback for backends to indicate that the provided entry matches the search criteria and that additional processing should be performed to potentially send it back to the client.booleanreturnPersistentSearchEntry(Entry entry, List<Control> controls)Used as a callback for persistent searches to send an entry which has just changed to the client.booleanreturnReference(DN dn, SearchResultReference reference)Returns the provided search result reference to the client.booleanreturnReference(DN dn, SearchResultReference reference, boolean evaluateAci)Used as a callback for backends to indicate that the provided search reference was encountered during processing and that additional processing should be performed to potentially send it back to the client.voidrun()Performs the work of actually processing this operation.voidsendSearchEntry(SearchResultEntry searchEntry)Sends the provided search result entry to the client.booleansendSearchReference(SearchResultReference searchReference)Sends the provided search result reference to the client.voidsendSearchResultDone()Sends the search result done message to the client.voidsetAttributes(Set<String> attributes)Specifies the set of requested attributes for this search operation.voidsetBaseDN(DN baseDN)Specifies the base DN for this search operation.voidsetClientAcceptsReferrals(boolean clientAcceptReferrals)Specify whether the client is able to handle referrals.voidsetDerefPolicy(DereferenceAliasesPolicy derefPolicy)Specifies the alias dereferencing policy for this search operation.voidsetIncludeUsableControl(boolean includeUsableControl)Specify whether to include the account usable response control within the search result entries.voidsetMatchedValuesControl(MatchedValuesControl controls)Set the match values control.voidsetProxiedAuthorizationDN(DN proxiedAuthorizationDN)Set the proxied authorization DN for this operation if proxied authorization has been requested.voidsetRawBaseDN(ByteString rawBaseDN)Specifies the raw, unprocessed base DN for this search operation.voidsetRawFilter(RawFilter rawFilter)Specifies the raw, unprocessed search filter as included in the request from the client.voidsetRealAttributesOnly(boolean realAttributesOnly)Specify whether to only return real attributes.voidsetReturnSubentriesOnly(boolean returnLDAPSubentries)Set the flag indicating whether the LDAP subentries should be returned.voidsetScope(SearchScope scope)Specifies the scope for this search operation.voidsetSendResponse(boolean sendResponse)Specify whether the search result done message has to be sent to the client, or not.voidsetSizeLimit(int sizeLimit)Specifies the size limit for this search operation.voidsetTimeLimit(int timeLimit)Specifies the time limit for this search operation.voidsetTimeLimitExpiration(long timeLimitExpiration)Set the time after which the search time limit has expired.voidsetTypesOnly(boolean typesOnly)Specifies the typesOnly flag for this search operation.voidsetVirtualAttributesOnly(boolean virtualAttributesOnly)Specify whether to only return virtual attributes.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
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.InProgressOperation
addAdditionalLogItem, appendErrorMessage, getAdditionalLogItems, getAuthorizationDN, getErrorMessage, getMatchedDN, getReferralURLs, getResultCode, setErrorMessage, setMatchedDN, setReferralURLs, setResponseData, setResultCode
-
Methods inherited from interface org.opends.server.types.Operation
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
-
SearchOperationBasis
public SearchOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, ByteString rawBaseDN, SearchScope scope, DereferenceAliasesPolicy derefPolicy, int sizeLimit, int timeLimit, boolean typesOnly, RawFilter rawFilter, Set<String> attributes)
Creates a new search 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.rawBaseDN- The raw, unprocessed base DN as included in the request from the client.scope- The scope for this search operation.derefPolicy- The alias dereferencing policy for this search operation.sizeLimit- The size limit for this search operation.timeLimit- The time limit for this search operation.typesOnly- The typesOnly flag for this search operation.rawFilter- the raw, unprocessed filter as included in the request from the client.attributes- The requested attributes for this search operation.
-
SearchOperationBasis
public SearchOperationBasis(ClientConnection clientConnection, long operationID, int messageID, List<Control> requestControls, DN baseDN, SearchScope scope, DereferenceAliasesPolicy derefPolicy, int sizeLimit, int timeLimit, boolean typesOnly, SearchFilter filter, Set<String> attributes)
Creates a new search 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.baseDN- The base DN for this search operation.scope- The scope for this search operation.derefPolicy- The alias dereferencing policy for this search operation.sizeLimit- The size limit for this search operation.timeLimit- The time limit for this search operation.typesOnly- The typesOnly flag for this search operation.filter- The filter for this search operation.attributes- The attributes for this search operation.
-
-
Method Detail
-
getRawBaseDN
public final ByteString getRawBaseDN()
Description copied from interface:PreParseSearchOperationRetrieves the raw, unprocessed base DN as included in the request from the client. This may or may not contain a valid DN, as no validation will have been performed.- Specified by:
getRawBaseDNin interfacePostResponseSearchOperation- Specified by:
getRawBaseDNin interfacePreParseSearchOperation- Specified by:
getRawBaseDNin interfaceSearchEntrySearchOperation- Specified by:
getRawBaseDNin interfaceSearchOperation- Specified by:
getRawBaseDNin interfaceSearchReferenceSearchOperation- Returns:
- The raw, unprocessed base DN as included in the request from the client.
-
setRawBaseDN
public final void setRawBaseDN(ByteString rawBaseDN)
Description copied from interface:PreParseSearchOperationSpecifies the raw, unprocessed base DN for this search operation.- Specified by:
setRawBaseDNin interfacePreParseSearchOperation- Specified by:
setRawBaseDNin interfaceSearchOperation- Parameters:
rawBaseDN- The raw, unprocessed base DN for this search operation.
-
getBaseDN
public final DN getBaseDN()
Description copied from interface:PostResponseSearchOperationRetrieves the base DN for this search operation.- Specified by:
getBaseDNin interfacePostResponseSearchOperation- Specified by:
getBaseDNin interfaceSearchEntrySearchOperation- Specified by:
getBaseDNin interfaceSearchOperation- Specified by:
getBaseDNin interfaceSearchReferenceSearchOperation- Returns:
- The base DN for this search operation.
-
setBaseDN
public final void setBaseDN(DN baseDN)
Description copied from interface:SearchOperationSpecifies the base DN for this search operation. This method is only intended for internal use.- Specified by:
setBaseDNin interfaceSearchOperation- Parameters:
baseDN- The base DN for this search operation.
-
getScope
public final SearchScope getScope()
Description copied from interface:PreParseSearchOperationRetrieves the scope for this search operation.- Specified by:
getScopein interfacePostResponseSearchOperation- Specified by:
getScopein interfacePreParseSearchOperation- Specified by:
getScopein interfaceSearchEntrySearchOperation- Specified by:
getScopein interfaceSearchOperation- Specified by:
getScopein interfaceSearchReferenceSearchOperation- Returns:
- The scope for this search operation.
-
setScope
public final void setScope(SearchScope scope)
Description copied from interface:PreParseSearchOperationSpecifies the scope for this search operation.- Specified by:
setScopein interfacePreParseSearchOperation- Specified by:
setScopein interfaceSearchOperation- Parameters:
scope- The scope for this search operation.
-
getDerefPolicy
public final DereferenceAliasesPolicy getDerefPolicy()
Description copied from interface:PreParseSearchOperationRetrieves the alias dereferencing policy for this search operation.- Specified by:
getDerefPolicyin interfacePostResponseSearchOperation- Specified by:
getDerefPolicyin interfacePreParseSearchOperation- Specified by:
getDerefPolicyin interfaceSearchEntrySearchOperation- Specified by:
getDerefPolicyin interfaceSearchOperation- Specified by:
getDerefPolicyin interfaceSearchReferenceSearchOperation- Returns:
- The alias dereferencing policy for this search operation.
-
setDerefPolicy
public final void setDerefPolicy(DereferenceAliasesPolicy derefPolicy)
Description copied from interface:PreParseSearchOperationSpecifies the alias dereferencing policy for this search operation.- Specified by:
setDerefPolicyin interfacePreParseSearchOperation- Specified by:
setDerefPolicyin interfaceSearchOperation- Parameters:
derefPolicy- The alias dereferencing policy for this search operation.
-
getSizeLimit
public final int getSizeLimit()
Description copied from interface:PreParseSearchOperationRetrieves the size limit for this search operation.- Specified by:
getSizeLimitin interfacePostResponseSearchOperation- Specified by:
getSizeLimitin interfacePreParseSearchOperation- Specified by:
getSizeLimitin interfaceSearchEntrySearchOperation- Specified by:
getSizeLimitin interfaceSearchOperation- Specified by:
getSizeLimitin interfaceSearchReferenceSearchOperation- Returns:
- The size limit for this search operation.
-
setSizeLimit
public final void setSizeLimit(int sizeLimit)
Description copied from interface:PreParseSearchOperationSpecifies the size limit for this search operation.- Specified by:
setSizeLimitin interfacePreParseSearchOperation- Specified by:
setSizeLimitin interfaceSearchOperation- Parameters:
sizeLimit- The size limit for this search operation.
-
getTimeLimit
public final int getTimeLimit()
Description copied from interface:PreParseSearchOperationRetrieves the time limit for this search operation.- Specified by:
getTimeLimitin interfacePostResponseSearchOperation- Specified by:
getTimeLimitin interfacePreParseSearchOperation- Specified by:
getTimeLimitin interfaceSearchEntrySearchOperation- Specified by:
getTimeLimitin interfaceSearchOperation- Specified by:
getTimeLimitin interfaceSearchReferenceSearchOperation- Returns:
- The time limit for this search operation.
-
setTimeLimit
public final void setTimeLimit(int timeLimit)
Description copied from interface:PreParseSearchOperationSpecifies the time limit for this search operation.- Specified by:
setTimeLimitin interfacePreParseSearchOperation- Specified by:
setTimeLimitin interfaceSearchOperation- Parameters:
timeLimit- The time limit for this search operation.
-
getTypesOnly
public final boolean getTypesOnly()
Description copied from interface:PreParseSearchOperationRetrieves the typesOnly flag for this search operation.- Specified by:
getTypesOnlyin interfacePostResponseSearchOperation- Specified by:
getTypesOnlyin interfacePreParseSearchOperation- Specified by:
getTypesOnlyin interfaceSearchEntrySearchOperation- Specified by:
getTypesOnlyin interfaceSearchOperation- Specified by:
getTypesOnlyin interfaceSearchReferenceSearchOperation- Returns:
- The typesOnly flag for this search operation.
-
setTypesOnly
public final void setTypesOnly(boolean typesOnly)
Description copied from interface:PreParseSearchOperationSpecifies the typesOnly flag for this search operation.- Specified by:
setTypesOnlyin interfacePreParseSearchOperation- Specified by:
setTypesOnlyin interfaceSearchOperation- Parameters:
typesOnly- The typesOnly flag for this search operation.
-
getRawFilter
public final RawFilter getRawFilter()
Description copied from interface:PreParseSearchOperationRetrieves the raw, unprocessed search filter as included in the request from the client. It may or may not contain a valid filter (e.g., unsupported attribute types or values with an invalid syntax) because no validation will have been performed on it.- Specified by:
getRawFilterin interfacePostResponseSearchOperation- Specified by:
getRawFilterin interfacePreParseSearchOperation- Specified by:
getRawFilterin interfaceSearchEntrySearchOperation- Specified by:
getRawFilterin interfaceSearchOperation- Specified by:
getRawFilterin interfaceSearchReferenceSearchOperation- Returns:
- The raw, unprocessed search filter as included in the request from the client.
-
setRawFilter
public final void setRawFilter(RawFilter rawFilter)
Description copied from interface:PreParseSearchOperationSpecifies the raw, unprocessed search filter as included in the request from the client.- Specified by:
setRawFilterin interfacePreParseSearchOperation- Specified by:
setRawFilterin interfaceSearchOperation- Parameters:
rawFilter- The raw, unprocessed search filter.
-
getFilter
public final SearchFilter getFilter()
Description copied from interface:PostResponseSearchOperationRetrieves the filter for this search operation.- Specified by:
getFilterin interfacePostResponseSearchOperation- Specified by:
getFilterin interfaceSearchEntrySearchOperation- Specified by:
getFilterin interfaceSearchOperation- Specified by:
getFilterin interfaceSearchReferenceSearchOperation- Returns:
- The filter for this search operation.
-
getAttributes
public final Set<String> getAttributes()
Description copied from interface:PreParseSearchOperationRetrieves the set of requested attributes for this search operation. Its contents should not be altered.- Specified by:
getAttributesin interfacePostResponseSearchOperation- Specified by:
getAttributesin interfacePreParseSearchOperation- Specified by:
getAttributesin interfaceSearchEntrySearchOperation- Specified by:
getAttributesin interfaceSearchOperation- Specified by:
getAttributesin interfaceSearchReferenceSearchOperation- Returns:
- The set of requested attributes for this search operation.
-
setAttributes
public final void setAttributes(Set<String> attributes)
Description copied from interface:PreParseSearchOperationSpecifies the set of requested attributes for this search operation.- Specified by:
setAttributesin interfacePreParseSearchOperation- Specified by:
setAttributesin interfaceSearchOperation- Parameters:
attributes- The set of requested attributes for this search operation.
-
getEntriesSent
public final int getEntriesSent()
Description copied from interface:PostResponseSearchOperationRetrieves the number of entries sent to the client for this search operation.- Specified by:
getEntriesSentin interfacePostResponseSearchOperation- Specified by:
getEntriesSentin interfaceSearchOperation- Returns:
- The number of entries sent to the client for this search operation.
-
getReferencesSent
public final int getReferencesSent()
Description copied from interface:PostResponseSearchOperationRetrieves the number of search references sent to the client for this search operation.- Specified by:
getReferencesSentin interfacePostResponseSearchOperation- Specified by:
getReferencesSentin interfaceSearchOperation- Returns:
- The number of search references sent to the client for this search operation.
-
returnEntry
public final boolean returnEntry(Entry entry, List<Control> controls)
Description copied from interface:PreParseSearchOperationReturns the provided entry to the client.- Specified by:
returnEntryin interfacePreParseSearchOperation- Specified by:
returnEntryin interfaceSearchOperation- Parameters:
entry- The entry that should be returned.controls- The set of controls to include with the entry (may benullif no controls should be included with the entry).- Returns:
trueif the caller should continue processing the search request and sending additional entries and references, orfalseif not for some reason (e.g., the size limit has been reached or the search has been abandoned).
-
endSearchPhase
public final void endSearchPhase()
Description copied from interface:SearchOperationIndicates that the search phase is over and that any further entry comes from a persistent search. State kept to dereference aliases during the search phase is released. Entries can still reachSearchOperation.returnEntry(Entry, List)afterwards, as backends are free to report their own results from another thread, so that method keeps track of this phase being over.- Specified by:
endSearchPhasein interfaceSearchOperation
-
returnEntry
public final boolean returnEntry(Entry entry, List<Control> controls, boolean evaluateAci)
Description copied from interface:SearchOperationUsed as a callback for backends to indicate that the provided entry matches the search criteria and that additional processing should be performed to potentially send it back to the client.- Specified by:
returnEntryin interfaceSearchOperation- Parameters:
entry- The entry that matches the search criteria and should be sent to the client.controls- The set of controls to include with the entry (may benullif none are needed).evaluateAci- Indicates whether the access rights to the entry should be evaluated.- Returns:
trueif the caller should continue processing the search request and sending additional entries and references, orfalseif not for some reason (e.g., the size limit has been reached or the search has been abandoned).
-
returnPersistentSearchEntry
public final boolean returnPersistentSearchEntry(Entry entry, List<Control> controls)
Description copied from interface:SearchOperationUsed as a callback for persistent searches to send an entry which has just changed to the client. Contrary toSearchOperation.returnEntry(Entry, List), the entry is not matched against the state kept to dereference aliases during the search phase, and neither the size limit nor the time limit of the search applies to it: a persistent search must report every change it is notified of, for as long as it is alive, whether or not the entry was returned before.- Specified by:
returnPersistentSearchEntryin interfaceSearchOperation- Parameters:
entry- The entry which has changed and should be sent to the client.controls- The set of controls to include with the entry (may benullif none are needed).- Returns:
trueif the persistent search should keep reporting changes, orfalseif it should stop for some reason (e.g. the search has been abandoned).
-
returnReference
public final boolean returnReference(DN dn, SearchResultReference reference)
Description copied from interface:PreParseSearchOperationReturns the provided search result reference to the client.- Specified by:
returnReferencein interfacePreParseSearchOperation- Specified by:
returnReferencein interfaceSearchOperation- Parameters:
dn- A DN related to the specified search reference.reference- The search reference that should be returned.- Returns:
trueif the caller should continue processing the search request and sending additional entries and references, orfalseif not for some reason (e.g., the size limit has been reached or the search has been abandoned).
-
returnReference
public final boolean returnReference(DN dn, SearchResultReference reference, boolean evaluateAci)
Description copied from interface:SearchOperationUsed as a callback for backends to indicate that the provided search reference was encountered during processing and that additional processing should be performed to potentially send it back to the client.- Specified by:
returnReferencein interfaceSearchOperation- Parameters:
dn- The DN related to the specified search reference.reference- The search reference to send to the client.evaluateAci- Indicates whether the access rights to the entry should be evaluated.- Returns:
trueif the caller should continue processing the search request and sending additional entries and references , orfalseif not for some reason (e.g., the size limit has been reached or the search has been abandoned).
-
sendSearchResultDone
public final void sendSearchResultDone()
Description copied from interface:SearchOperationSends the search result done message to the client. Note that this method should only be called from external classes in special cases (e.g., persistent search) where they are sure that the result won't be sent by the core server. Also note that the result code and optionally the error message should have been set for this operation before this method is called.- Specified by:
sendSearchResultDonein interfaceSearchOperation
-
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()
Description copied from interface:SearchOperationRetrieves the proxied authorization DN for this operation if proxied authorization has been requested.- Specified by:
getProxiedAuthorizationDNin interfaceOperation- Specified by:
getProxiedAuthorizationDNin interfaceSearchOperation- Returns:
- The proxied authorization DN for this operation if proxied
authorization has been requested, or
nullif proxied authorization has not been requested.
-
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 interfaceInProgressOperation- 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 interfaceInProgressOperation- 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.
-
abort
public void abort(CancelRequest cancelRequest)
Description copied from interface:OperationAttempts to abort this operation before processing has completed.- Specified by:
abortin interfaceOperation- Overrides:
abortin classAbstractOperation- Parameters:
cancelRequest- Information about the way in which the operation should be canceled.
-
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.
-
setTimeLimitExpiration
public void setTimeLimitExpiration(long timeLimitExpiration)
Description copied from interface:SearchOperationSet the time after which the search time limit has expired.- Specified by:
setTimeLimitExpirationin interfaceSearchOperation- Parameters:
timeLimitExpiration- - Time after which the search has expired
-
isReturnSubentriesOnly
public boolean isReturnSubentriesOnly()
Description copied from interface:SearchOperationIndicates whether LDAP subentries should be returned or not.- Specified by:
isReturnSubentriesOnlyin interfaceSearchOperation- Returns:
- true if the LDAP subentries should be returned, false otherwise
-
setReturnSubentriesOnly
public void setReturnSubentriesOnly(boolean returnLDAPSubentries)
Description copied from interface:SearchOperationSet the flag indicating whether the LDAP subentries should be returned.- Specified by:
setReturnSubentriesOnlyin interfaceSearchOperation- Parameters:
returnLDAPSubentries- - Boolean indicating whether the LDAP subentries should be returned or not
-
getMatchedValuesControl
public MatchedValuesControl getMatchedValuesControl()
Description copied from interface:SearchOperationThe matched values control associated with this search operation.- Specified by:
getMatchedValuesControlin interfaceSearchOperation- Returns:
- the match values control
-
setMatchedValuesControl
public void setMatchedValuesControl(MatchedValuesControl controls)
Description copied from interface:SearchOperationSet the match values control.- Specified by:
setMatchedValuesControlin interfaceSearchOperation- Parameters:
controls- - The matched values control
-
isIncludeUsableControl
public boolean isIncludeUsableControl()
Description copied from interface:SearchOperationIndicates whether to include the account usable response control with search result entries or not.- Specified by:
isIncludeUsableControlin interfaceSearchOperation- Returns:
- true if the usable control has to be part of the search result entry
-
setIncludeUsableControl
public void setIncludeUsableControl(boolean includeUsableControl)
Description copied from interface:SearchOperationSpecify whether to include the account usable response control within the search result entries.- Specified by:
setIncludeUsableControlin interfaceSearchOperation- Parameters:
includeUsableControl- - True if the account usable response control has to be included within the search result entries, false otherwise
-
getTimeLimitExpiration
public long getTimeLimitExpiration()
Description copied from interface:SearchOperationGet the time after which the search time limit has expired.- Specified by:
getTimeLimitExpirationin interfaceSearchOperation- Returns:
- the timeLimitExpiration
-
isClientAcceptsReferrals
public boolean isClientAcceptsReferrals()
Description copied from interface:SearchOperationIndicates whether the client is able to handle referrals.- Specified by:
isClientAcceptsReferralsin interfaceSearchOperation- Returns:
- true, if the client is able to handle referrals
-
setClientAcceptsReferrals
public void setClientAcceptsReferrals(boolean clientAcceptReferrals)
Description copied from interface:SearchOperationSpecify whether the client is able to handle referrals.- Specified by:
setClientAcceptsReferralsin interfaceSearchOperation- Parameters:
clientAcceptReferrals- - Boolean set to true if the client can handle referrals
-
isSendResponse
public boolean isSendResponse()
Description copied from interface:SearchOperationIndicates whether the search result done message has to be sent to the client, or not.- Specified by:
isSendResponsein interfaceSearchOperation- Returns:
- true if the search result done message is to be sent to the client
-
setSendResponse
public void setSendResponse(boolean sendResponse)
Description copied from interface:SearchOperationSpecify whether the search result done message has to be sent to the client, or not.- Specified by:
setSendResponsein interfaceSearchOperation- Parameters:
sendResponse- - boolean indicating whether the search result done message is to send to the client
-
isRealAttributesOnly
public boolean isRealAttributesOnly()
Description copied from interface:SearchOperationReturns true if only real attributes should be returned.- Specified by:
isRealAttributesOnlyin interfaceSearchOperation- Returns:
- true if only real attributes should be returned, false otherwise
-
isVirtualAttributesOnly
public boolean isVirtualAttributesOnly()
Description copied from interface:SearchOperationReturns true if only virtual attributes should be returned.- Specified by:
isVirtualAttributesOnlyin interfaceSearchOperation- Returns:
- true if only virtual attributes should be returned, false otherwise
-
setRealAttributesOnly
public void setRealAttributesOnly(boolean realAttributesOnly)
Description copied from interface:SearchOperationSpecify whether to only return real attributes.- Specified by:
setRealAttributesOnlyin interfaceSearchOperation- Parameters:
realAttributesOnly- - boolean setup to true, if only the real attributes should be returned
-
setVirtualAttributesOnly
public void setVirtualAttributesOnly(boolean virtualAttributesOnly)
Description copied from interface:SearchOperationSpecify whether to only return virtual attributes.- Specified by:
setVirtualAttributesOnlyin interfaceSearchOperation- Parameters:
virtualAttributesOnly- - boolean setup to true, if only the virtual attributes should be returned
-
sendSearchEntry
public void sendSearchEntry(SearchResultEntry searchEntry) throws DirectoryException
Description copied from interface:SearchOperationSends the provided search result entry to the client.- Specified by:
sendSearchEntryin interfaceSearchOperation- Parameters:
searchEntry- The search result entry to be sent to the client.- Throws:
DirectoryException- If a problem occurs while attempting to send the entry to the client and the search should be terminated.
-
sendSearchReference
public boolean sendSearchReference(SearchResultReference searchReference) throws DirectoryException
Description copied from interface:SearchOperationSends the provided search result reference to the client.- Specified by:
sendSearchReferencein interfaceSearchOperation- Parameters:
searchReference- The search result reference to be sent to the client.- Returns:
trueif the client is able to accept referrals, orfalseif the client cannot handle referrals and no more attempts should be made to send them for the associated search operation.- Throws:
DirectoryException- If a problem occurs while attempting to send the reference to the client and the search should be terminated.
-
setProxiedAuthorizationDN
public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
Description copied from interface:SearchOperationSet the proxied authorization DN for this operation if proxied authorization has been requested.- Specified by:
setProxiedAuthorizationDNin interfaceOperation- Specified by:
setProxiedAuthorizationDNin interfaceSearchOperation- Parameters:
proxiedAuthorizationDN- The proxied authorization DN for this operation if proxied authorization has been requested, ornullif proxied authorization has not been requested.
-
run
public final void run()
Description copied from interface:OperationPerforms the work of actually processing this operation. This should include all processing for the operation, including invoking pre-parse and post-response plugins, logging messages and any other work that might need to be done in the course of processing.
-
updateOperationErrMsgAndResCode
public void updateOperationErrMsgAndResCode()
Description copied from class:AbstractOperationUpdates the error message and the result code of the operation. This method is called because no workflows were found to process the operation.- Overrides:
updateOperationErrMsgAndResCodein classAbstractOperation
-
-