|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.core.OperationWrapper
org.opends.server.core.SearchOperationWrapper
public abstract class SearchOperationWrapper
This abstract class wraps/decorates a given search operation. This class will be extended by sub-classes to enhance the functionality of the SearchOperationBasis.
| Field Summary |
|---|
| Fields inherited from interface org.opends.server.types.Operation |
|---|
LOCALBACKENDOPERATIONS |
| Constructor Summary | |
|---|---|
protected |
SearchOperationWrapper(SearchOperation search)
Creates a new search operation based on the provided search operation. |
| Method Summary | |
|---|---|
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. |
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. |
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. |
boolean |
returnEntry(Entry entry,
java.util.List<Control> controls)
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. |
boolean |
returnReference(DN dn,
SearchResultReference reference)
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. |
void |
sendSearchEntry(SearchResultEntry entry)
Sends the provided search result entry to the client. |
boolean |
sendSearchReference(SearchResultReference reference)
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 as included in the request from the client. |
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. |
java.lang.String |
toString()
Retrieves a string representation of this operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected SearchOperationWrapper(SearchOperation search)
search - The search operation to wrap| Method Detail |
|---|
public boolean returnEntry(Entry entry,
java.util.List<Control> controls)
returnEntry in interface SearchOperationentry - 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 be
null if none are needed).
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 boolean returnReference(DN dn,
SearchResultReference reference)
returnReference in interface SearchOperationdn - The DN related to the specified search reference.reference - The search reference to send to the client.
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 java.lang.String toString()
toString in interface OperationtoString in class java.lang.Objectpublic java.util.LinkedHashSet<java.lang.String> getAttributes()
getAttributes in interface SearchOperationpublic DN getBaseDN()
getRawBaseDN method.
getBaseDN in interface SearchOperationnull if the
raw base DN has not yet been processed.public DereferencePolicy getDerefPolicy()
getDerefPolicy in interface SearchOperationpublic int getEntriesSent()
getEntriesSent in interface SearchOperationpublic SearchFilter getFilter()
getFilter in interface SearchOperationnull if the
raw filter has not yet been processed.public ByteString getRawBaseDN()
getRawBaseDN in interface SearchOperationpublic RawFilter getRawFilter()
getRawFilter in interface SearchOperationpublic int getReferencesSent()
getReferencesSent in interface SearchOperationpublic SearchScope getScope()
getScope in interface SearchOperationpublic int getSizeLimit()
getSizeLimit in interface SearchOperationpublic int getTimeLimit()
getTimeLimit in interface SearchOperationpublic boolean getTypesOnly()
getTypesOnly in interface SearchOperationpublic void sendSearchResultDone()
sendSearchResultDone in interface SearchOperationpublic void setAttributes(java.util.LinkedHashSet<java.lang.String> attributes)
setAttributes in interface SearchOperationattributes - The set of requested attributes for this search
operation.public void setBaseDN(DN baseDN)
setBaseDN in interface SearchOperationbaseDN - The base DN for this search operation.public void setDerefPolicy(DereferencePolicy derefPolicy)
setDerefPolicy in interface SearchOperationderefPolicy - The alias dereferencing policy for this search
operation.public void setRawBaseDN(ByteString rawBaseDN)
setRawBaseDN in interface SearchOperationrawBaseDN - The raw, unprocessed base DN as included in the request
from the client.public void setRawFilter(RawFilter rawFilter)
setRawFilter in interface SearchOperationrawFilter - The raw, unprocessed search filter as included in the
request from the client.public void setScope(SearchScope scope)
setScope in interface SearchOperationscope - The scope for this search operation.public void setSizeLimit(int sizeLimit)
setSizeLimit in interface SearchOperationsizeLimit - The size limit for this search operation.public void setTimeLimit(int timeLimit)
setTimeLimit in interface SearchOperationtimeLimit - The time limit for this search operation.public void setTypesOnly(boolean typesOnly)
setTypesOnly in interface SearchOperationtypesOnly - The typesOnly flag for this search operation.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 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 PersistentSearch getPersistentSearch()
getPersistentSearch in interface SearchOperationpublic 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 void setRealAttributesOnly(boolean realAttributesOnly)
setRealAttributesOnly in interface SearchOperationrealAttributesOnly - - boolean setup to true, if only the real
attributes should be returnedpublic boolean isVirtualAttributesOnly()
isVirtualAttributesOnly in interface SearchOperationpublic void setVirtualAttributesOnly(boolean virtualAttributesOnly)
setVirtualAttributesOnly in interface SearchOperationvirtualAttributesOnly - - boolean setup to true, if only the virtual
attributes should be returned
public void sendSearchEntry(SearchResultEntry entry)
throws DirectoryException
sendSearchEntry in interface SearchOperationentry - The search result entry to be sent to
the client.
DirectoryException
public boolean sendSearchReference(SearchResultReference reference)
throws DirectoryException
sendSearchReference in interface SearchOperationreference - 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.
DirectoryExceptionpublic DN getProxiedAuthorizationDN()
getProxiedAuthorizationDN in interface SearchOperationnull if proxied
authorization has not been requested.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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||