|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.types.AbstractOperation
org.opends.server.core.SearchOperationBasis
public class SearchOperationBasis
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, useNanoTime |
| Fields inherited from interface org.opends.server.types.Operation |
|---|
LOCALBACKENDOPERATIONS |
| Constructor Summary | |
|---|---|
SearchOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
ByteString rawBaseDN,
SearchScope scope,
DereferencePolicy derefPolicy,
int sizeLimit,
int timeLimit,
boolean typesOnly,
RawFilter rawFilter,
java.util.LinkedHashSet<java.lang.String> attributes)
Creates a new search operation with the provided information. |
|
SearchOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
DN baseDN,
SearchScope scope,
DereferencePolicy derefPolicy,
int sizeLimit,
int timeLimit,
boolean typesOnly,
SearchFilter filter,
java.util.LinkedHashSet<java.lang.String> attributes)
Creates a new search operation with the provided information. |
|
| Method Summary | |
|---|---|
void |
abort(CancelRequest cancelRequest)
Attempts to cancel this operation before processing has completed without waiting for a cancel result. |
void |
addResponseControl(Control control)
Adds the provided control to the set of controls to include in the response to the client. |
java.util.LinkedHashSet<java.lang.String> |
getAttributes()
Retrieves the set of requested attributes for this search operation. |
DN |
getBaseDN()
Retrieves the base DN for this search operation. |
DereferencePolicy |
getDerefPolicy()
Retrieves the alias dereferencing policy for this search operation. |
int |
getEntriesSent()
Retrieves the number of entries sent to the client for this search operation. |
SearchFilter |
getFilter()
Retrieves the filter for this search operation. |
MatchedValuesControl |
getMatchedValuesControl()
The matched values control associated with this search operation. |
OperationType |
getOperationType()
Retrieves the operation type for this operation. |
PersistentSearch |
getPersistentSearch()
Get the psearch from the search operation. |
DN |
getProxiedAuthorizationDN()
Retrieves the proxied authorization DN for this operation if proxied authorization has been requested. |
ByteString |
getRawBaseDN()
Retrieves the raw, unprocessed base DN as included in the request from the client. |
RawFilter |
getRawFilter()
Retrieves the raw, unprocessed search filter as included in the request from the client. |
int |
getReferencesSent()
Retrieves the number of search references sent to the client for this search operation. |
java.lang.String[][] |
getRequestLogElements()
Retrieves a standard set of elements that should be logged in requests for this type of operation. |
java.util.List<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the client. |
java.lang.String[][] |
getResponseLogElements()
Retrieves a standard set of elements that should be logged in responses for this type of operation. |
SearchScope |
getScope()
Retrieves the scope for this search operation. |
int |
getSizeLimit()
Retrieves the size limit for this search operation. |
int |
getTimeLimit()
Retrieves the time limit for this search operation. |
java.lang.Long |
getTimeLimitExpiration()
Get the time after which the search time limit has expired. |
boolean |
getTypesOnly()
Retrieves the typesOnly flag for this search operation. |
void |
incrementEntriesSent()
Increments by 1 the number of entries sent to the client for this search operation. |
void |
incrementReferencesSent()
Increments by 1 the number of search references sent to the client for this search operation. |
boolean |
isClientAcceptsReferrals()
Indicates whether the client is able to handle referrals. |
boolean |
isIncludeUsableControl()
Indicates whether to include the account usable response control with search result entries or not. |
boolean |
isRealAttributesOnly()
Returns true if only real attributes should be returned. |
boolean |
isReturnLDAPSubentries()
Indicates whether LDAP subentries should be returned or not. |
boolean |
isSendResponse()
Indicates wether the search result done message has to be sent to the client, or not. |
boolean |
isVirtualAttributesOnly()
Returns true if only virtual attributes should be returned. |
void |
removeResponseControl(Control control)
Removes the provided control from the set of controls to include in the response to the client. |
boolean |
returnEntry(Entry entry,
java.util.List<Control> controls)
Returns the provided entry to the client. |
boolean |
returnReference(DN dn,
SearchResultReference reference)
Returns the provided search result reference to the client. |
void |
run()
Performs the work of actually processing this operation. |
void |
sendSearchEntry(SearchResultEntry searchEntry)
Sends the provided search result entry to the client. |
boolean |
sendSearchReference(SearchResultReference searchReference)
Sends the provided search result reference to the client. |
void |
sendSearchResultDone()
Sends the search result done message to the client. |
void |
setAttributes(java.util.LinkedHashSet<java.lang.String> attributes)
Specifies the set of requested attributes for this search operation. |
void |
setBaseDN(DN baseDN)
Specifies the base DN for this search operation. |
void |
setClientAcceptsReferrals(boolean clientAcceptReferrals)
Specify whether the client is able to handle referrals. |
void |
setDerefPolicy(DereferencePolicy derefPolicy)
Specifies the alias dereferencing policy for this search operation. |
void |
setIncludeUsableControl(boolean includeUsableControl)
Specify whether to include the account usable response control within the search result entries. |
void |
setMatchedValuesControl(MatchedValuesControl controls)
Set the match values control. |
void |
setPersistentSearch(PersistentSearch psearch)
Register the psearch in the search operation. |
void |
setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
Set the proxied authorization DN for this operation if proxied authorization has been requested. |
void |
setRawBaseDN(ByteString rawBaseDN)
Specifies the raw, unprocessed base DN for this search operation. |
void |
setRawFilter(RawFilter rawFilter)
Specifies the raw, unprocessed search filter as included in the request from the client. |
void |
setRealAttributesOnly(boolean realAttributesOnly)
Specify wether to only return real attributes. |
void |
setReturnLDAPSubentries(boolean returnLDAPSubentries)
Set the flag indicating wether the LDAP subentries should be returned. |
void |
setScope(SearchScope scope)
Specifies the scope for this search operation. |
void |
setSendResponse(boolean sendResponse)
Specify wether the search result done message has to be sent to the client, or not. |
void |
setSizeLimit(int sizeLimit)
Specifies the size limit for this search operation. |
void |
setTimeLimit(int timeLimit)
Specifies the time limit for this search operation. |
void |
setTimeLimitExpiration(java.lang.Long timeLimitExpiration)
Set the time after which the search time limit has expired. |
void |
setTypesOnly(boolean typesOnly)
Specifies the typesOnly flag for this search operation. |
void |
setVirtualAttributesOnly(boolean virtualAttributesOnly)
Specify wether to only return virtual attributes. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this operation to the provided buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opends.server.types.operation.PreParseOperation |
|---|
addRequestControl, appendAdditionalLogMessage, appendErrorMessage, getAdditionalLogMessage, getErrorMessage, removeRequestControl, setAdditionalLogMessage, setErrorMessage |
| Methods inherited from interface org.opends.server.types.operation.PostResponseOperation |
|---|
getAdditionalLogMessage, getAuthorizationDN, getErrorMessage, getMatchedDN, getProcessingStopTime, getProcessingTime, getReferralURLs, getResultCode |
| Methods inherited from interface org.opends.server.types.operation.InProgressOperation |
|---|
appendAdditionalLogMessage, appendErrorMessage, getAdditionalLogMessage, getAuthorizationDN, getErrorMessage, getMatchedDN, getReferralURLs, getResultCode, setAdditionalLogMessage, setErrorMessage, setMatchedDN, setReferralURLs, setResponseData, setResultCode |
| Methods inherited from interface org.opends.server.types.operation.PluginOperation |
|---|
checkIfCanceled, disconnectClient, getAttachment, getAttachments, getClientConnection, getConnectionID, getMessageID, getOperationID, getProcessingStartTime, getRequestControls, isInternalOperation, isSynchronizationOperation, removeAttachment, setAttachment, toString |
| Constructor Detail |
|---|
public SearchOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
ByteString rawBaseDN,
SearchScope scope,
DereferencePolicy derefPolicy,
int sizeLimit,
int timeLimit,
boolean typesOnly,
RawFilter rawFilter,
java.util.LinkedHashSet<java.lang.String> attributes)
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.
public SearchOperationBasis(ClientConnection clientConnection,
long operationID,
int messageID,
java.util.List<Control> requestControls,
DN baseDN,
SearchScope scope,
DereferencePolicy derefPolicy,
int sizeLimit,
int timeLimit,
boolean typesOnly,
SearchFilter filter,
java.util.LinkedHashSet<java.lang.String> attributes)
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 |
|---|
public final ByteString getRawBaseDN()
getRawBaseDN in interface SearchOperationgetRawBaseDN in interface PostResponseSearchOperationgetRawBaseDN in interface PreParseSearchOperationgetRawBaseDN in interface SearchEntrySearchOperationgetRawBaseDN in interface SearchReferenceSearchOperationpublic final void setRawBaseDN(ByteString rawBaseDN)
setRawBaseDN in interface SearchOperationsetRawBaseDN in interface PreParseSearchOperationrawBaseDN - The raw, unprocessed base DN for this search
operation.public final DN getBaseDN()
getBaseDN in interface SearchOperationgetBaseDN in interface PostResponseSearchOperationgetBaseDN in interface SearchEntrySearchOperationgetBaseDN in interface SearchReferenceSearchOperationpublic final void setBaseDN(DN baseDN)
setBaseDN in interface SearchOperationbaseDN - The base DN for this search operation.public final SearchScope getScope()
getScope in interface SearchOperationgetScope in interface PostResponseSearchOperationgetScope in interface PreParseSearchOperationgetScope in interface SearchEntrySearchOperationgetScope in interface SearchReferenceSearchOperationpublic final void setScope(SearchScope scope)
setScope in interface SearchOperationsetScope in interface PreParseSearchOperationscope - The scope for this search operation.public final DereferencePolicy getDerefPolicy()
getDerefPolicy in interface SearchOperationgetDerefPolicy in interface PostResponseSearchOperationgetDerefPolicy in interface PreParseSearchOperationgetDerefPolicy in interface SearchEntrySearchOperationgetDerefPolicy in interface SearchReferenceSearchOperationpublic final void setDerefPolicy(DereferencePolicy derefPolicy)
setDerefPolicy in interface SearchOperationsetDerefPolicy in interface PreParseSearchOperationderefPolicy - The alias dereferencing policy for this
search operation.public final int getSizeLimit()
getSizeLimit in interface SearchOperationgetSizeLimit in interface PostResponseSearchOperationgetSizeLimit in interface PreParseSearchOperationgetSizeLimit in interface SearchEntrySearchOperationgetSizeLimit in interface SearchReferenceSearchOperationpublic final void setSizeLimit(int sizeLimit)
setSizeLimit in interface SearchOperationsetSizeLimit in interface PreParseSearchOperationsizeLimit - The size limit for this search operation.public final int getTimeLimit()
getTimeLimit in interface SearchOperationgetTimeLimit in interface PostResponseSearchOperationgetTimeLimit in interface PreParseSearchOperationgetTimeLimit in interface SearchEntrySearchOperationgetTimeLimit in interface SearchReferenceSearchOperationpublic final void setTimeLimit(int timeLimit)
setTimeLimit in interface SearchOperationsetTimeLimit in interface PreParseSearchOperationtimeLimit - The time limit for this search operation.public final boolean getTypesOnly()
getTypesOnly in interface SearchOperationgetTypesOnly in interface PostResponseSearchOperationgetTypesOnly in interface PreParseSearchOperationgetTypesOnly in interface SearchEntrySearchOperationgetTypesOnly in interface SearchReferenceSearchOperationpublic final void setTypesOnly(boolean typesOnly)
setTypesOnly in interface SearchOperationsetTypesOnly in interface PreParseSearchOperationtypesOnly - The typesOnly flag for this search operation.public final RawFilter getRawFilter()
getRawFilter in interface SearchOperationgetRawFilter in interface PostResponseSearchOperationgetRawFilter in interface PreParseSearchOperationgetRawFilter in interface SearchEntrySearchOperationgetRawFilter in interface SearchReferenceSearchOperationpublic final void setRawFilter(RawFilter rawFilter)
setRawFilter in interface SearchOperationsetRawFilter in interface PreParseSearchOperationrawFilter - The raw, unprocessed search filter.public final SearchFilter getFilter()
getFilter in interface SearchOperationgetFilter in interface PostResponseSearchOperationgetFilter in interface SearchEntrySearchOperationgetFilter in interface SearchReferenceSearchOperationpublic final java.util.LinkedHashSet<java.lang.String> getAttributes()
getAttributes in interface SearchOperationgetAttributes in interface PostResponseSearchOperationgetAttributes in interface PreParseSearchOperationgetAttributes in interface SearchEntrySearchOperationgetAttributes in interface SearchReferenceSearchOperationpublic final void setAttributes(java.util.LinkedHashSet<java.lang.String> attributes)
setAttributes in interface SearchOperationsetAttributes in interface PreParseSearchOperationattributes - The set of requested attributes for this
search operation.public final int getEntriesSent()
getEntriesSent in interface SearchOperationgetEntriesSent in interface PostResponseSearchOperationpublic final int getReferencesSent()
getReferencesSent in interface SearchOperationgetReferencesSent in interface PostResponseSearchOperation
public final boolean returnEntry(Entry entry,
java.util.List<Control> controls)
returnEntry in interface SearchOperationreturnEntry in interface PreParseSearchOperationentry - The entry that should be returned.controls - The set of controls to include with the entry
(may be null if no controls should be
included with the entry).
true if the caller should continue processing
the search request and sending additional entries and
references, or false if not for some reason
(e.g., the size limit has been reached or the search has
been abandoned).
public final boolean returnReference(DN dn,
SearchResultReference reference)
returnReference in interface SearchOperationreturnReference in interface PreParseSearchOperationdn - A DN related to the specified search
reference.reference - The search reference that should be returned.
true if the caller should continue processing
the search request and sending additional entries and
references, or false if not for some reason
(e.g., the size limit has been reached or the search has
been abandoned).public final void sendSearchResultDone()
sendSearchResultDone in interface SearchOperationpublic final OperationType getOperationType()
getOperationType in interface OperationgetOperationType in interface PluginOperationgetOperationType in class AbstractOperationpublic final java.lang.String[][] getRequestLogElements()
null if there is no value for that
field.
getRequestLogElements in interface OperationgetRequestLogElements in class AbstractOperationpublic final java.lang.String[][] getResponseLogElements()
null if there is no value for that
field.
getResponseLogElements in interface OperationgetResponseLogElements in class AbstractOperationpublic DN getProxiedAuthorizationDN()
getProxiedAuthorizationDN in interface SearchOperationnull if proxied
authorization has not been requested.public final java.util.List<Control> getResponseControls()
getResponseControls in interface OperationgetResponseControls in interface PluginOperationgetResponseControls in class AbstractOperationpublic final void addResponseControl(Control control)
addResponseControl in interface OperationaddResponseControl in interface InProgressOperationaddResponseControl in interface PreParseOperationaddResponseControl in class AbstractOperationcontrol - The control to add to the set of controls to
include in the response to the client.public final void removeResponseControl(Control control)
removeResponseControl in interface OperationremoveResponseControl in interface InProgressOperationremoveResponseControl in interface PreParseOperationremoveResponseControl in class AbstractOperationcontrol - The control to remove from the set of controls
to include in the response to the client.public void abort(CancelRequest cancelRequest)
abort in interface Operationabort in class AbstractOperationcancelRequest - Information about the way in which the
operation should be canceled.public final void toString(java.lang.StringBuilder buffer)
toString in interface OperationtoString in interface PluginOperationtoString in class AbstractOperationbuffer - The buffer into which a string representation of
this operation should be appended.public void setTimeLimitExpiration(java.lang.Long timeLimitExpiration)
setTimeLimitExpiration in interface SearchOperationtimeLimitExpiration - - Time after which the search has expiredpublic boolean isReturnLDAPSubentries()
isReturnLDAPSubentries in interface SearchOperationpublic void setReturnLDAPSubentries(boolean returnLDAPSubentries)
setReturnLDAPSubentries in interface SearchOperationreturnLDAPSubentries - - Boolean indicating wether the LDAP
subentries should be returned or notpublic MatchedValuesControl getMatchedValuesControl()
getMatchedValuesControl in interface SearchOperationpublic void setMatchedValuesControl(MatchedValuesControl controls)
setMatchedValuesControl in interface SearchOperationcontrols - - The matched values controlpublic PersistentSearch getPersistentSearch()
getPersistentSearch in interface SearchOperationpublic boolean isIncludeUsableControl()
isIncludeUsableControl in interface SearchOperationpublic void setIncludeUsableControl(boolean includeUsableControl)
setIncludeUsableControl in interface SearchOperationincludeUsableControl - - True if the account usable response control
has to be included within the search result
entries, false otherwisepublic void setPersistentSearch(PersistentSearch psearch)
setPersistentSearch in interface SearchOperationpsearch - - Persistent search associated to that operationpublic java.lang.Long getTimeLimitExpiration()
getTimeLimitExpiration in interface SearchOperationpublic boolean isClientAcceptsReferrals()
isClientAcceptsReferrals in interface SearchOperationpublic void setClientAcceptsReferrals(boolean clientAcceptReferrals)
setClientAcceptsReferrals in interface SearchOperationclientAcceptReferrals - - Boolean set to true if the client
can handle referralspublic void incrementEntriesSent()
incrementEntriesSent in interface SearchOperationpublic void incrementReferencesSent()
incrementReferencesSent in interface SearchOperationpublic boolean isSendResponse()
isSendResponse in interface SearchOperationpublic void setSendResponse(boolean sendResponse)
setSendResponse in interface SearchOperationsendResponse - - boolean indicating wether the search result done
message is to send to the clientpublic boolean isRealAttributesOnly()
isRealAttributesOnly in interface SearchOperationpublic boolean isVirtualAttributesOnly()
isVirtualAttributesOnly in interface SearchOperationpublic void setRealAttributesOnly(boolean realAttributesOnly)
setRealAttributesOnly in interface SearchOperationrealAttributesOnly - - boolean setup to true, if only the real
attributes should be returnedpublic void setVirtualAttributesOnly(boolean virtualAttributesOnly)
setVirtualAttributesOnly in interface SearchOperationvirtualAttributesOnly - - boolean setup to true, if only the virtual
attributes should be returned
public void sendSearchEntry(SearchResultEntry searchEntry)
throws DirectoryException
sendSearchEntry in interface SearchOperationsearchEntry - The search result entry to be sent to
the client.
DirectoryException - If a problem occurs while attempting
to send the entry to the client and
the search should be terminated.
public boolean sendSearchReference(SearchResultReference searchReference)
throws DirectoryException
sendSearchReference in interface SearchOperationsearchReference - The search result reference to be sent
to the client.
true if the client is able to accept
referrals, or false if the client cannot
handle referrals and no more attempts should be made to
send them for the associated search operation.
DirectoryException - If a problem occurs while attempting
to send the reference to the client
and the search should be terminated.public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
setProxiedAuthorizationDN in interface SearchOperationproxiedAuthorizationDN - The proxied authorization DN for this operation if proxied
authorization has been requested, or null if proxied
authorization has not been requested.public final void run()
run in interface java.lang.Runnablerun in class AbstractOperation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||