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

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.ExtensibleMatchFilter
All Implemented Interfaces:
Asn1Object

public class ExtensibleMatchFilter
extends Filter

The search request filter Matching Rule assertion

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.asn1.AbstractAsn1Object
parent
 
Constructor Summary
ExtensibleMatchFilter()
          Creates a new ExtensibleMatchFilter object.
ExtensibleMatchFilter(int tlvId)
          Creates a new ExtensibleMatchFilter object.
 
Method Summary
 int computeLength()
          Compute the ExtensibleMatchFilter length ExtensibleMatchFilter : 0xA9 L1 | [+--> 0x81 L3 matchingRule] [+--> 0x82 L4 type] [+--> 0x83 L5 matchValue] [+--> 0x01 0x01 dnAttributes]
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encode the ExtensibleMatch Filters to a PDU.
 int getExpectedMatchingRuleLength()
          get the expectedMatchingRuleLength
 java.lang.String getMatchingRule()
          Get the matchingRule
 java.lang.Object getMatchValue()
          Get the matchValue
 java.lang.String getType()
          Get the type
 boolean isDnAttributes()
          Get the dnAttributes flag
 void setDnAttributes(boolean dnAttributes)
          Set the dnAttributes flag
 void setExpectedMatchingRuleLength(int expectedMatchingRuleLength)
          Set the expectedMatchingRuleLength
 void setMatchingRule(java.lang.String matchingRule)
          Set the matchingRule
 void setMatchValue(java.lang.Object matchValue)
          Set the matchValue
 void setType(java.lang.String type)
          Set the type
 java.lang.String toString()
          Return a String representing an extended filter as of RFC 2254
 
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

ExtensibleMatchFilter

public ExtensibleMatchFilter(int tlvId)
Creates a new ExtensibleMatchFilter object. The dnAttributes flag defaults to false.


ExtensibleMatchFilter

public ExtensibleMatchFilter()
Creates a new ExtensibleMatchFilter object. The dnAttributes flag defaults to false.

Method Detail

isDnAttributes

public boolean isDnAttributes()
Get the dnAttributes flag

Returns:
Returns the dnAttributes.

setDnAttributes

public void setDnAttributes(boolean dnAttributes)
Set the dnAttributes flag

Parameters:
dnAttributes - The dnAttributes to set.

getMatchingRule

public java.lang.String getMatchingRule()
Get the matchingRule

Returns:
Returns the matchingRule.

setMatchingRule

public void setMatchingRule(java.lang.String matchingRule)
Set the matchingRule

Parameters:
matchingRule - The matchingRule to set.

getMatchValue

public java.lang.Object getMatchValue()
Get the matchValue

Returns:
Returns the matchValue.

setMatchValue

public void setMatchValue(java.lang.Object matchValue)
Set the matchValue

Parameters:
matchValue - The matchValue to set.

getType

public java.lang.String getType()
Get the type

Returns:
Returns the type.

setType

public void setType(java.lang.String type)
Set the type

Parameters:
type - The type to set.

getExpectedMatchingRuleLength

public int getExpectedMatchingRuleLength()
get the expectedMatchingRuleLength

Returns:
Returns the expectedMatchingRuleLength.

setExpectedMatchingRuleLength

public void setExpectedMatchingRuleLength(int expectedMatchingRuleLength)
Set the expectedMatchingRuleLength

Parameters:
expectedMatchingRuleLength - The expectedMatchingRuleLength to set.

computeLength

public int computeLength()
Compute the ExtensibleMatchFilter length ExtensibleMatchFilter : 0xA9 L1 | [+--> 0x81 L3 matchingRule] [+--> 0x82 L4 type] [+--> 0x83 L5 matchValue] [+--> 0x01 0x01 dnAttributes]

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 ExtensibleMatch Filters to a PDU. ExtensibleMatch filter : 0xA9 LL | 0x81 LL matchingRule | / | 0x82 LL Type | / | /0x83 LL matchValue +--+ +-+ | \ \ | \ 0x83 LL MatchValue | 0x82 LL type | 0x83 LL matchValue +--[0x84 0x01 dnAttributes]

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 representing an extended filter as of RFC 2254

Overrides:
toString in class java.lang.Object
Returns:
An Extened Filter String


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