Class SearchResultEntryDecorator

    • Method Detail

      • addAttribute

        public void addAttribute​(byte[] type)
                          throws LdapException
        Create a new attribute
        Parameters:
        type - The attribute's type
        Throws:
        LdapException - If the value is invalid
      • setObjectName

        public void setObjectName​(Dn objectName)
        Sets the distinguished name of the entry object returned.
        Specified by:
        setObjectName in interface SearchResultEntry
        Parameters:
        objectName - the Dn of the entry returned.
      • computeLength

        public int computeLength()
        Compute the SearchResultEntry length
        SearchResultEntry :
         0x64 L1
          |
          +--> 0x04 L2 objectName
          +--> 0x30 L3 (attributes)
                |
                +--> 0x30 L4-1 (partial attributes list)
                |     |
                |     +--> 0x04 L5-1 type
                |     +--> 0x31 L6-1 (values)
                |           |
                |           +--> 0x04 L7-1-1 value
                |           +--> ...
                |           +--> 0x04 L7-1-n value
                |
                +--> 0x30 L4-2 (partial attributes list)
                |     |
                |     +--> 0x04 L5-2 type
                |     +--> 0x31 L6-2 (values)
                |           |
                |           +--> 0x04 L7-2-1 value
                |           +--> ...
                |           +--> 0x04 L7-2-n value
                |
                +--> ...
                |
                +--> 0x30 L4-m (partial attributes list)
                      |
                      +--> 0x04 L5-m type
                      +--> 0x31 L6-m (values)
                            |
                            +--> 0x04 L7-m-1 value
                            +--> ...
                            +--> 0x04 L7-m-n value
         
        Specified by:
        computeLength in interface Asn1Object
        Returns:
        The object's computed length
      • encode

        public ByteBuffer encode​(ByteBuffer buffer)
                          throws EncoderException
        Encode the SearchResultEntry message to a PDU.
        SearchResultEntry :
         0x64 LL
           0x04 LL objectName
           0x30 LL attributes
             0x30 LL partialAttributeList
               0x04 LL type
               0x31 LL vals
                 0x04 LL attributeValue
                 ...
                 0x04 LL attributeValue
             ...
             0x30 LL partialAttributeList
               0x04 LL type
               0x31 LL vals
                 0x04 LL attributeValue
                 ...
                 0x04 LL attributeValue
         
        Specified by:
        encode in interface Asn1Object
        Parameters:
        buffer - The buffer where to put the PDU
        Returns:
        The PDU.
        Throws:
        EncoderException - if the buffer can't be encoded