Class NotFilter
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.search.Filter
-
- org.apache.directory.api.ldap.codec.search.ConnectorFilter
-
- org.apache.directory.api.ldap.codec.search.NotFilter
-
public class NotFilter extends ConnectorFilter
Not Filter Object to store the Not filter.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(Filter filter)
Subclass the addFilterMethod, as this is specific for a NotFilter (we cannot have more than one elements).int
computeLength()
Compute the NotFilter length
NotFilter :ByteBuffer
encode(ByteBuffer buffer)
Encode the NotFilter message to a PDU.Filter
getNotFilter()
Get the NotFiltervoid
setNotFilter(Filter notFilter)
Set the NotFilterString
toString()
Return a string compliant with RFC 2254 representing a NOT filter-
Methods inherited from class org.apache.directory.api.ldap.codec.search.ConnectorFilter
getFilterSet
-
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
Subclass the addFilterMethod, as this is specific for a NotFilter (we cannot have more than one elements).- Overrides:
addFilter
in classConnectorFilter
- Parameters:
filter
- The Filter to add- Throws:
DecoderException
- If the decoding failed
-
getNotFilter
public Filter getNotFilter()
Get the NotFilter- Returns:
- Returns the notFilter.
-
setNotFilter
public void setNotFilter(Filter notFilter) throws DecoderException
Set the NotFilter- Parameters:
notFilter
- The notFilter to set.- Throws:
DecoderException
- If the NotFilter is already containing a filter
-
computeLength
public int computeLength()
Compute the NotFilter length
NotFilter :0xA2 L1 super.computeLength() Length(NotFilter) = Length(0xA2) + Length(super.computeLength()) + super.computeLength()
- Overrides:
computeLength
in classConnectorFilter
- Returns:
- The encoded length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the NotFilter message to a PDU.
NotFilter :0xA2 LL filter.encode()
- Overrides:
encode
in classConnectorFilter
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The PDU.
- Throws:
EncoderException
- If the encoding failed
-
toString
public String toString()
Return a string compliant with RFC 2254 representing a NOT filter- Overrides:
toString
in classConnectorFilter
- Returns:
- The NOT filter string
-
-