|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.LdapMessageCodec
org.apache.directory.shared.ldap.codec.search.SearchRequestCodec
public class SearchRequestCodec
A SearchRequest ldapObject. It's a sub-class of Asn1Object, and it implements the ldapObject class to be seen as a member of the LdapMessage CHOICE.
Field Summary |
---|
Fields inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec |
---|
ldapMessageLength |
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
parent |
Constructor Summary | |
---|---|
SearchRequestCodec()
Creates a new SearchRequest object. |
Method Summary | |
---|---|
void |
addAttribute(java.lang.String attribute)
Add an attribute to the attributes list. |
void |
addCurrentFilter(Filter localFilter)
Add a current filter. |
protected int |
computeLengthProtocolOp()
Compute the SearchRequest length SearchRequest : |
protected void |
encodeProtocolOp(java.nio.ByteBuffer buffer)
Encode the SearchRequest message to a PDU. |
java.util.List<EntryAttribute> |
getAttributes()
Get the list of attributes |
DN |
getBaseObject()
Get the base object |
Filter |
getCurrentFilter()
Get the current dilter |
int |
getDerefAliases()
Get the derefAliases flag |
Filter |
getFilter()
Get the filter |
MessageTypeEnum |
getMessageType()
Get the message type |
java.lang.String |
getMessageTypeName()
Get the message type Name |
SearchScope |
getScope()
Get the search scope |
long |
getSizeLimit()
Get the size limit |
Filter |
getTerminalFilter()
Get the comparison dilter |
int |
getTimeLimit()
Get the time limit |
boolean |
isTypesOnly()
Get the typesOnly flag |
void |
setBaseObject(DN baseObject)
Set the base object |
void |
setCurrentFilter(Filter filter)
Set the current dilter |
void |
setDerefAliases(int derefAliases)
Set the derefAliases flag |
void |
setFilter(Filter filter)
Set the filter |
void |
setScope(SearchScope scope)
Set the search scope |
void |
setSizeLimit(long sizeLimit)
Set the size limit |
void |
setTerminalFilter(Filter terminalFilter)
Set the terminal filter |
void |
setTimeLimit(int timeLimit)
Set the time limit |
void |
setTypesOnly(boolean typesOnly)
Set the typesOnly flag |
java.lang.String |
toString()
Return a string the represent a SearchRequest |
void |
unstackFilters(IAsn1Container container)
This method is used to clear the filter's stack for terminated elements. |
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec |
---|
addControl, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toString |
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
addLength, encode, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchRequestCodec()
Method Detail |
---|
public MessageTypeEnum getMessageType()
getMessageType
in class LdapMessageCodec
public java.lang.String getMessageTypeName()
getMessageTypeName
in class LdapMessageCodec
public java.util.List<EntryAttribute> getAttributes()
public void addAttribute(java.lang.String attribute)
attribute
- The attribute to add to the listpublic DN getBaseObject()
public void setBaseObject(DN baseObject)
baseObject
- The baseObject to set.public int getDerefAliases()
public void setDerefAliases(int derefAliases)
derefAliases
- The derefAliases to set.public Filter getFilter()
public void setFilter(Filter filter)
filter
- The filter to set.public SearchScope getScope()
public void setScope(SearchScope scope)
scope
- The scope to set.public long getSizeLimit()
public void setSizeLimit(long sizeLimit)
sizeLimit
- The sizeLimit to set.public int getTimeLimit()
public void setTimeLimit(int timeLimit)
timeLimit
- The timeLimit to set.public boolean isTypesOnly()
public void setTypesOnly(boolean typesOnly)
typesOnly
- The typesOnly to set.public Filter getCurrentFilter()
public Filter getTerminalFilter()
public void setTerminalFilter(Filter terminalFilter)
terminalFilter
- the teminalFilter.public void addCurrentFilter(Filter localFilter) throws DecoderException
localFilter
- The filter to set.
DecoderException
public void setCurrentFilter(Filter filter)
filter
- The filter to set.public void unstackFilters(IAsn1Container container)
container
- The container being decodedprotected int computeLengthProtocolOp()
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
computeLengthProtocolOp
in class LdapMessageCodec
protected void encodeProtocolOp(java.nio.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
encodeProtocolOp
in class LdapMessageCodec
buffer
- The buffer where to put the PDU
EncoderException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |