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

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
All Implemented Interfaces:
Asn1Object
Direct Known Subclasses:
AndFilter, NotFilter, OrFilter

public abstract class ConnectorFilter
extends Filter

This Filter abstract class is used to store a set of filters used by OR/AND/NOT filters.

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

Field Summary
protected  java.util.List<Filter> filterSet
          The set of filters used by And/Or filters
protected  int filtersLength
          The filters length
 
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
parent
 
Constructor Summary
ConnectorFilter()
          The constructor.
ConnectorFilter(int tlvId)
          The constructor.
 
Method Summary
 void addFilter(Filter filter)
          Add a new Filter to the list.
 int computeLength()
          Compute the ConnectorFilter length Length(ConnectorFilter) = sum(filterSet.computeLength())
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encode the ConnectorFilter message to a PDU.
 java.util.List<Filter> getFilterSet()
          Get the list of filters stored in the composite filter
 java.lang.String toString()
          Return a string compliant with RFC 2254 representing a composite filter, one of AND, OR and NOT
 
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
 

Field Detail

filterSet

protected java.util.List<Filter> filterSet
The set of filters used by And/Or filters


filtersLength

protected int filtersLength
The filters length

Constructor Detail

ConnectorFilter

public ConnectorFilter(int tlvId)
The constructor. We wont initialize the ArrayList as it may not be used.


ConnectorFilter

public ConnectorFilter()
The constructor. We wont initialize the ArrayList as it may not be used.

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

getFilterSet

public java.util.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:
computeLength in interface Asn1Object
Specified by:
computeLength in class AbstractAsn1Object
Returns:
The object's computed length

encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws EncoderException
Encode the ConnectorFilter message to a PDU. ConnectorFilter : filter.encode() ... filter.encode()

Specified by:
encode in interface Asn1Object
Overrides:
encode in class AbstractAsn1Object
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 composite filter, one of AND, OR and NOT

Overrides:
toString in class java.lang.Object
Returns:
The composite filter string


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