org.apache.directory.shared.ldap.codec.search
Class NotFilter

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.ldap.codec.search.Filter
          extended by org.apache.directory.shared.ldap.codec.search.ConnectorFilter
              extended by org.apache.directory.shared.ldap.codec.search.NotFilter
All Implemented Interfaces:
Asn1Object

public class NotFilter
extends ConnectorFilter

Not Filter Object to store the Not filter.

Version:
$Rev: 664290 $, $Date: 2008-06-07 08:28:06 +0200 (Sa, 07 Jun 2008) $,
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.codec.search.ConnectorFilter
filterSet, filtersLength
 
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
parent
 
Constructor Summary
NotFilter()
          The constructor.
NotFilter(int tlvId)
          The constructor.
 
Method Summary
 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 : 0xA2 L1 super.computeLength() Length(NotFilter) = Length(0xA2) + Length(super.computeLength()) + super.computeLength()
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encode the NotFilter message to a PDU.
 Filter getNotFilter()
          Get the NotFilter
 void setNotFilter(Filter notFilter)
          Set the NotFilter
 java.lang.String toString()
          Return a string compliant with RFC 2254 representing a NOT filter
 
Methods inherited from class org.apache.directory.shared.ldap.codec.search.ConnectorFilter
getFilterSet
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
addLength, 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

NotFilter

public NotFilter(int tlvId)
The constructor.


NotFilter

public NotFilter()
The constructor.

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 class ConnectorFilter
Parameters:
filter - The Filter to add
Throws:
DecoderException

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

computeLength

public int computeLength()
Compute the NotFilter length NotFilter : 0xA2 L1 super.computeLength() Length(NotFilter) = Length(0xA2) + Length(super.computeLength()) + super.computeLength()

Specified by:
computeLength in interface Asn1Object
Overrides:
computeLength in class ConnectorFilter
Returns:
The object's computed length

encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws EncoderException
Encode the NotFilter message to a PDU. NotFilter : 0xA2 LL filter.encode()

Specified by:
encode in interface Asn1Object
Overrides:
encode in class ConnectorFilter
Parameters:
buffer - The buffer where to put the PDU
Returns:
The PDU.
Throws:
EncoderException - if the buffer can't be encoded

toString

public java.lang.String toString()
Return a string compliant with RFC 2254 representing a NOT filter

Overrides:
toString in class ConnectorFilter
Returns:
The NOT filter string


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.