Class ExtensibleMatchFilter
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.search.Filter
-
- org.apache.directory.api.ldap.codec.search.ExtensibleMatchFilter
-
public class ExtensibleMatchFilter extends Filter
The search request filter Matching Rule assertion- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description ExtensibleMatchFilter()
Creates a new ExtensibleMatchFilter object.ExtensibleMatchFilter(int tlvId)
Creates a new ExtensibleMatchFilter object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeLength()
Compute the ExtensibleMatchFilter length
ExtensibleMatchFilter :ByteBuffer
encode(ByteBuffer buffer)
Encode the ExtensibleMatch Filters to a PDU.int
getExpectedMatchingRuleLength()
get the expectedMatchingRuleLengthString
getMatchingRule()
Get the matchingRuleValue
getMatchValue()
Get the matchValueString
getType()
Get the typeboolean
isDnAttributes()
Get the dnAttributes flagvoid
setDnAttributes(boolean dnAttributes)
Set the dnAttributes flagvoid
setExpectedMatchingRuleLength(int expectedMatchingRuleLength)
Set the expectedMatchingRuleLengthvoid
setMatchingRule(String matchingRule)
Set the matchingRulevoid
setMatchValue(Value matchValue)
Set the matchValuevoid
setType(String type)
Set the typeString
toString()
Return a String representing an extended filter as of RFC 2254-
Methods inherited from class org.apache.directory.api.ldap.codec.search.Filter
getParent, getParentTlvId, getTlvId, setParent
-
-
-
-
Constructor Detail
-
ExtensibleMatchFilter
public ExtensibleMatchFilter(int tlvId)
Creates a new ExtensibleMatchFilter object. The dnAttributes flag defaults to false.- Parameters:
tlvId
- The TLV identifier
-
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 String getMatchingRule()
Get the matchingRule- Returns:
- Returns the matchingRule.
-
setMatchingRule
public void setMatchingRule(String matchingRule)
Set the matchingRule- Parameters:
matchingRule
- The matchingRule to set.
-
getMatchValue
public Value getMatchValue()
Get the matchValue- Returns:
- Returns the matchValue.
-
setMatchValue
public void setMatchValue(Value matchValue)
Set the matchValue- Parameters:
matchValue
- The matchValue 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 classFilter
- Returns:
- The encoded length
-
encode
public ByteBuffer encode(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 classFilter
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The PDU.
- Throws:
EncoderException
- If the encoding failed
-
-