Class AttributeValueAssertionFilter
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.search.Filter
-
- org.apache.directory.api.ldap.codec.search.AttributeValueAssertionFilter
-
public class AttributeValueAssertionFilter extends Filter
Object to store the filter. A filter is seen as a tree with a root.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description AttributeValueAssertionFilter(int filterType)
The constructor.AttributeValueAssertionFilter(int tlvId, int filterType)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeLength()
Compute the AttributeValueFilter length
AttributeValueFilter :ByteBuffer
encode(ByteBuffer buffer)
Encode the AttributeValueAssertion Filters to a PDU.AttributeValueAssertion
getAssertion()
Get the assertionint
getFilterType()
Get the filter typevoid
setAssertion(AttributeValueAssertion assertion)
Set the assertionvoid
setFilterType(int filterType)
Set the filter typeString
toString()
Return a string compliant with RFC 2254 representing an item filter-
Methods inherited from class org.apache.directory.api.ldap.codec.search.Filter
getParent, getParentTlvId, getTlvId, setParent
-
-
-
-
Constructor Detail
-
AttributeValueAssertionFilter
public AttributeValueAssertionFilter(int tlvId, int filterType)
The constructor.- Parameters:
tlvId
- The TLV identifierfilterType
- The filter type
-
AttributeValueAssertionFilter
public AttributeValueAssertionFilter(int filterType)
The constructor.- Parameters:
filterType
- The filter type
-
-
Method Detail
-
getAssertion
public AttributeValueAssertion getAssertion()
Get the assertion- Returns:
- Returns the assertion.
-
setAssertion
public void setAssertion(AttributeValueAssertion assertion)
Set the assertion- Parameters:
assertion
- The assertion to set.
-
getFilterType
public int getFilterType()
Get the filter type- Returns:
- Returns the filterType.
-
setFilterType
public void setFilterType(int filterType)
Set the filter type- Parameters:
filterType
- The filterType to set.
-
computeLength
public int computeLength()
Compute the AttributeValueFilter length
AttributeValueFilter :0xA(3, 5, 6, 8) L1 | +--> 0x04 L2 attributeDesc +--> 0x04 L3 assertionValue L2 = Length(attributeDesc) L3 = Length(assertionValue) L1 = 1 + Length(L2) + L2 + 1 + Length(L3) + L3 Length(AttributeValueFilter) = Length(0xA?) + Length(L1) + 1 + Length(L2) + L2 + 1 + Length(L3) + L3
- Specified by:
computeLength
in classFilter
- Returns:
- The encoded length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the AttributeValueAssertion Filters to a PDU. The following filters are to be encoded :- equality match
- greater or equal
- less or equal
- approx match
0xA[3, 5, 6, 8] LL 0x04 LL attributeDesc 0x04 LL assertionValue
- Specified by:
encode
in classFilter
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The PDU.
- Throws:
EncoderException
- If the encoding failed
-
-