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
-
-
Field Summary
-
Fields inherited from class org.apache.directory.api.ldap.codec.search.Filter
parent, parentTlvId, tlvId
-
-
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 intcomputeLength()Compute the ExtensibleMatchFilter length
ExtensibleMatchFilter :ByteBufferencode(ByteBuffer buffer)Encode the ExtensibleMatch Filters to a PDU.intgetExpectedMatchingRuleLength()get the expectedMatchingRuleLengthStringgetMatchingRule()Get the matchingRuleValuegetMatchValue()Get the matchValueStringgetType()Get the typebooleanisDnAttributes()Get the dnAttributes flagvoidsetDnAttributes(boolean dnAttributes)Set the dnAttributes flagvoidsetExpectedMatchingRuleLength(int expectedMatchingRuleLength)Set the expectedMatchingRuleLengthvoidsetMatchingRule(String matchingRule)Set the matchingRulevoidsetMatchValue(Value matchValue)Set the matchValuevoidsetType(String type)Set the typeStringtoString()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.
-
getType
public String getType()
Get the type- Returns:
- Returns the type.
-
setType
public void setType(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:
computeLengthin 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:
encodein classFilter- Parameters:
buffer- The buffer where to put the PDU- Returns:
- The PDU.
- Throws:
EncoderException- If the encoding failed
-
-