|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.codec.decorators.MessageDecorator<SearchRequest>
org.apache.directory.shared.ldap.codec.decorators.SearchRequestDecorator
public class SearchRequestDecorator
A decorator for the SearchRequest message
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
messageLength |
| Fields inherited from interface org.apache.directory.shared.ldap.model.message.SearchRequest |
|---|
RESPONSE_TYPES |
| Constructor Summary | |
|---|---|
SearchRequestDecorator(LdapCodecService codec,
SearchRequest decoratedMessage)
Makes a SearchRequest encodable. |
|
| Method Summary | |
|---|---|
void |
abandon()
|
void |
addAbandonListener(AbandonListener listener)
|
void |
addAttributes(String... attributes)
|
void |
addCurrentFilter(Filter localFilter)
Add a current filter. |
int |
computeLength()
Compute the SearchRequest length SearchRequest : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the SearchRequest message to a PDU. |
int |
getAttributeDescriptionListLength()
|
List<String> |
getAttributes()
|
Dn |
getBase()
|
Filter |
getCodecFilter()
Gets the search filter associated with this search request. |
Filter |
getCurrentFilter()
|
AliasDerefMode |
getDerefAliases()
|
ExprNode |
getFilter()
|
ExprNode |
getFilterNode()
Gets the search filter associated with this search request. |
MessageTypeEnum[] |
getResponseTypes()
|
ResultResponse |
getResultResponse()
|
SearchScope |
getScope()
|
int |
getSearchRequestLength()
|
long |
getSizeLimit()
|
Filter |
getTerminalFilter()
Get the terminal filter |
int |
getTimeLimit()
|
boolean |
getTypesOnly()
|
int |
hashCode()
|
boolean |
hasResponse()
|
boolean |
isAbandoned()
|
void |
removeAttribute(String attribute)
|
void |
setAttributeDescriptionListLength(int attributeDescriptionListLength)
Stores the encoded length for the list of attributes |
void |
setBase(Dn baseDn)
|
void |
setCurrentFilter(Filter filter)
Set the current filter |
void |
setDerefAliases(AliasDerefMode aliasDerefAliases)
|
void |
setFilter(ExprNode filter)
|
void |
setFilter(String filter)
|
void |
setScope(SearchScope scope)
|
void |
setSearchRequestLength(int searchRequestLength)
Stores the encoded length for the SearchRequest |
void |
setSizeLimit(long entriesMax)
|
void |
setTerminalFilter(Filter terminalFilter)
Set the terminal filter |
void |
setTimeLimit(int secondsMax)
|
void |
setTlvId(int tlvId)
Set the SearchRequest PDU TLV's Id |
void |
setTypesOnly(boolean typesOnly)
|
void |
unstackFilters(Asn1Container container)
This method is used to clear the filter's stack for terminated elements. |
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message |
|---|
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId |
| Constructor Detail |
|---|
public SearchRequestDecorator(LdapCodecService codec,
SearchRequest decoratedMessage)
decoratedMessage - the decorated SearchRequest| Method Detail |
|---|
public void setSearchRequestLength(int searchRequestLength)
searchRequestLength - The encoded lengthpublic int getSearchRequestLength()
public void setAttributeDescriptionListLength(int attributeDescriptionListLength)
attributeDescriptionListLength - The encoded length of the attributespublic int getAttributeDescriptionListLength()
public void setTlvId(int tlvId)
tlvId - The TLV idpublic Filter getCurrentFilter()
public Filter getCodecFilter()
public ExprNode getFilterNode()
public Filter getTerminalFilter()
public void setTerminalFilter(Filter terminalFilter)
terminalFilter - the teminalFilter.public void setFilter(ExprNode filter)
setFilter in interface SearchRequest
public void setFilter(String filter)
throws LdapException
setFilter in interface SearchRequestLdapExceptionpublic void setCurrentFilter(Filter filter)
filter - The filter to set.
public void addCurrentFilter(Filter localFilter)
throws DecoderException
localFilter - The filter to set.
DecoderExceptionpublic void unstackFilters(Asn1Container container)
container - The container being decodedpublic int hashCode()
hashCode in class Objectpublic MessageTypeEnum[] getResponseTypes()
getResponseTypes in interface ManyReplyRequestgetResponseTypes in interface SearchRequestpublic Dn getBase()
getBase in interface SearchRequestpublic void setBase(Dn baseDn)
setBase in interface SearchRequestpublic SearchScope getScope()
getScope in interface SearchRequestpublic void setScope(SearchScope scope)
setScope in interface SearchRequestpublic AliasDerefMode getDerefAliases()
getDerefAliases in interface SearchRequestpublic void setDerefAliases(AliasDerefMode aliasDerefAliases)
setDerefAliases in interface SearchRequestpublic long getSizeLimit()
getSizeLimit in interface SearchRequestpublic void setSizeLimit(long entriesMax)
setSizeLimit in interface SearchRequestpublic int getTimeLimit()
getTimeLimit in interface SearchRequestpublic void setTimeLimit(int secondsMax)
setTimeLimit in interface SearchRequestpublic boolean getTypesOnly()
getTypesOnly in interface SearchRequestpublic void setTypesOnly(boolean typesOnly)
setTypesOnly in interface SearchRequestpublic ExprNode getFilter()
getFilter in interface SearchRequestpublic List<String> getAttributes()
getAttributes in interface SearchRequestpublic void addAttributes(String... attributes)
addAttributes in interface SearchRequestpublic void removeAttribute(String attribute)
removeAttribute in interface SearchRequestpublic int computeLength()
0x63 L1
|
+--> 0x04 L2 baseObject
+--> 0x0A 0x01 scope
+--> 0x0A 0x01 derefAliases
+--> 0x02 0x0(1..4) sizeLimit
+--> 0x02 0x0(1..4) timeLimit
+--> 0x01 0x01 typesOnly
+--> filter.computeLength()
+--> 0x30 L3 (Attribute description list)
|
+--> 0x04 L4-1 Attribute description
+--> 0x04 L4-2 Attribute description
+--> ...
+--> 0x04 L4-i Attribute description
+--> ...
+--> 0x04 L4-n Attribute description
computeLength in interface Decorator<SearchRequest>
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
0x63 LL
0x04 LL baseObject
0x0A 01 scope
0x0A 01 derefAliases
0x02 0N sizeLimit
0x02 0N timeLimit
0x01 0x01 typesOnly
filter.encode()
0x30 LL attributeDescriptionList
0x04 LL attributeDescription
...
0x04 LL attributeDescription
encode in interface Decorator<SearchRequest>buffer - The buffer where to put the PDU
EncoderException - if the buffer can't be encodedpublic ResultResponse getResultResponse()
getResultResponse in interface ResultResponseRequestpublic boolean hasResponse()
hasResponse in interface Requestpublic void abandon()
abandon in interface AbandonableRequestpublic boolean isAbandoned()
isAbandoned in interface AbandonableRequestpublic void addAbandonListener(AbandonListener listener)
addAbandonListener in interface AbandonableRequest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||