Class AttributeValueAssertionFilter

    • Constructor Detail

      • AttributeValueAssertionFilter

        public AttributeValueAssertionFilter​(int tlvId,
                                             int filterType)
        The constructor.
        Parameters:
        tlvId - The TLV identifier
        filterType - The filter type
      • AttributeValueAssertionFilter

        public AttributeValueAssertionFilter​(int filterType)
        The constructor.
        Parameters:
        filterType - The filter type
    • Method Detail

      • 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 class Filter
        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
        AttributeValueAssertion filters :
         0xA[3, 5, 6, 8] LL
           0x04 LL attributeDesc
           0x04 LL assertionValue
         
        Specified by:
        encode in class Filter
        Parameters:
        buffer - The buffer where to put the PDU
        Returns:
        The PDU.
        Throws:
        EncoderException - If the encoding failed
      • toString

        public String toString()
        Return a string compliant with RFC 2254 representing an item filter
        Overrides:
        toString in class Object
        Returns:
        The item filter string