Class ConnectorFilter
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.search.Filter
-
- org.apache.directory.api.ldap.codec.search.ConnectorFilter
-
public abstract class ConnectorFilter extends Filter
This Filter abstract class is used to store a set of filters used by OR/AND/NOT filters.- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Filter>filterSetThe set of filters used by And/Or filtersprotected intfiltersLengthThe filters length-
Fields inherited from class org.apache.directory.api.ldap.codec.search.Filter
parent, parentTlvId, tlvId
-
-
Constructor Summary
Constructors Constructor Description ConnectorFilter()The constructor.ConnectorFilter(int tlvId)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(Filter filter)Add a new Filter to the list.intcomputeLength()Compute the ConnectorFilter length Length(ConnectorFilter) = sum(filterSet.computeLength())ByteBufferencode(ByteBuffer buffer)Encode the ConnectorFilter message to a PDU.List<Filter>getFilterSet()Get the list of filters stored in the composite filterStringtoString()Return a string compliant with RFC 2254 representing a composite filter, one of AND, OR and NOT-
Methods inherited from class org.apache.directory.api.ldap.codec.search.Filter
getParent, getParentTlvId, getTlvId, setParent
-
-
-
-
Method Detail
-
addFilter
public void addFilter(Filter filter) throws DecoderException
Add a new Filter to the list.- Parameters:
filter- The filter to add- Throws:
DecoderException- If the decoding failed
-
getFilterSet
public List<Filter> getFilterSet()
Get the list of filters stored in the composite filter- Returns:
- And array of filters
-
computeLength
public int computeLength()
Compute the ConnectorFilter length Length(ConnectorFilter) = sum(filterSet.computeLength())- Specified by:
computeLengthin classFilter- Returns:
- The encoded length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the ConnectorFilter message to a PDU.ConnectorFilter : filter.encode() ... filter.encode()
- Specified by:
encodein classFilter- Parameters:
buffer- The buffer where to put the PDU- Returns:
- The PDU.
- Throws:
EncoderException- If the encoding failed
-
-