|
|||||||||
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 wrapMethod Detail |
---|
public boolean returnEntry(Entry entry, java.util.List<Control> controls)
returnEntry
in interface SearchOperation
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 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 SearchOperation
dn
- 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 Operation
toString
in class java.lang.Object
public java.util.LinkedHashSet<java.lang.String> getAttributes()
getAttributes
in interface SearchOperation
public DN getBaseDN()
getRawBaseDN
method.
getBaseDN
in interface SearchOperation
null
if the
raw base DN has not yet been processed.public DereferencePolicy getDerefPolicy()
getDerefPolicy
in interface SearchOperation
public int getEntriesSent()
getEntriesSent
in interface SearchOperation
public SearchFilter getFilter()
getFilter
in interface SearchOperation
null
if the
raw filter has not yet been processed.public ByteString getRawBaseDN()
getRawBaseDN
in interface SearchOperation
public RawFilter getRawFilter()
getRawFilter
in interface SearchOperation
public int getReferencesSent()
getReferencesSent
in interface SearchOperation
public SearchScope getScope()
getScope
in interface SearchOperation
public int getSizeLimit()
getSizeLimit
in interface SearchOperation
public int getTimeLimit()
getTimeLimit
in interface SearchOperation
public boolean getTypesOnly()
getTypesOnly
in interface SearchOperation
public void sendSearchResultDone()
sendSearchResultDone
in interface SearchOperation
public void setAttributes(java.util.LinkedHashSet<java.lang.String> attributes)
setAttributes
in interface SearchOperation
attributes
- The set of requested attributes for this search
operation.public void setBaseDN(DN baseDN)
setBaseDN
in interface SearchOperation
baseDN
- The base DN for this search operation.public void setDerefPolicy(DereferencePolicy derefPolicy)
setDerefPolicy
in interface SearchOperation
derefPolicy
- The alias dereferencing policy for this search
operation.public void setRawBaseDN(ByteString rawBaseDN)
setRawBaseDN
in interface SearchOperation
rawBaseDN
- The raw, unprocessed base DN as included in the request
from the client.public void setRawFilter(RawFilter rawFilter)
setRawFilter
in interface SearchOperation
rawFilter
- The raw, unprocessed search filter as included in the
request from the client.public void setScope(SearchScope scope)
setScope
in interface SearchOperation
scope
- The scope for this search operation.public void setSizeLimit(int sizeLimit)
setSizeLimit
in interface SearchOperation
sizeLimit
- The size limit for this search operation.public void setTimeLimit(int timeLimit)
setTimeLimit
in interface SearchOperation
timeLimit
- The time limit for this search operation.public void setTypesOnly(boolean typesOnly)
setTypesOnly
in interface SearchOperation
typesOnly
- The typesOnly flag for this search operation.public void setTimeLimitExpiration(java.lang.Long timeLimitExpiration)
setTimeLimitExpiration
in interface SearchOperation
timeLimitExpiration
- - Time after which the search has expiredpublic boolean isReturnLDAPSubentries()
isReturnLDAPSubentries
in interface SearchOperation
public void setReturnLDAPSubentries(boolean returnLDAPSubentries)
setReturnLDAPSubentries
in interface SearchOperation
returnLDAPSubentries
- - Boolean indicating wether the LDAP
subentries should be returned or notpublic MatchedValuesControl getMatchedValuesControl()
getMatchedValuesControl
in interface SearchOperation
public void setMatchedValuesControl(MatchedValuesControl controls)
setMatchedValuesControl
in interface SearchOperation
controls
- - The matched values controlpublic boolean isIncludeUsableControl()
isIncludeUsableControl
in interface SearchOperation
public void setIncludeUsableControl(boolean includeUsableControl)
setIncludeUsableControl
in interface SearchOperation
includeUsableControl
- - 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 SearchOperation
psearch
- - Persistent search associated to that operationpublic PersistentSearch getPersistentSearch()
getPersistentSearch
in interface SearchOperation
public java.lang.Long getTimeLimitExpiration()
getTimeLimitExpiration
in interface SearchOperation
public boolean isClientAcceptsReferrals()
isClientAcceptsReferrals
in interface SearchOperation
public void setClientAcceptsReferrals(boolean clientAcceptReferrals)
setClientAcceptsReferrals
in interface SearchOperation
clientAcceptReferrals
- - Boolean set to true if the client
can handle referralspublic void incrementEntriesSent()
incrementEntriesSent
in interface SearchOperation
public void incrementReferencesSent()
incrementReferencesSent
in interface SearchOperation
public boolean isSendResponse()
isSendResponse
in interface SearchOperation
public void setSendResponse(boolean sendResponse)
setSendResponse
in interface SearchOperation
sendResponse
- - boolean indicating wether the search result done
message is to send to the clientpublic boolean isRealAttributesOnly()
isRealAttributesOnly
in interface SearchOperation
public void setRealAttributesOnly(boolean realAttributesOnly)
setRealAttributesOnly
in interface SearchOperation
realAttributesOnly
- - boolean setup to true, if only the real
attributes should be returnedpublic boolean isVirtualAttributesOnly()
isVirtualAttributesOnly
in interface SearchOperation
public void setVirtualAttributesOnly(boolean virtualAttributesOnly)
setVirtualAttributesOnly
in interface SearchOperation
virtualAttributesOnly
- - boolean setup to true, if only the virtual
attributes should be returnedpublic void sendSearchEntry(SearchResultEntry entry) throws DirectoryException
sendSearchEntry
in interface SearchOperation
entry
- The search result entry to be sent to
the client.
DirectoryException
public boolean sendSearchReference(SearchResultReference reference) throws DirectoryException
sendSearchReference
in interface SearchOperation
reference
- 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
public DN getProxiedAuthorizationDN()
getProxiedAuthorizationDN
in interface SearchOperation
null
if proxied
authorization has not been requested.public void setProxiedAuthorizationDN(DN proxiedAuthorizationDN)
setProxiedAuthorizationDN
in interface SearchOperation
proxiedAuthorizationDN
- 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 |