Class AddRequestImpl

    • Constructor Detail

      • AddRequestImpl

        public AddRequestImpl()
        Creates an AddRequest implementation to create a new entry.
    • Method Detail

      • addAttributeType

        public void addAttributeType​(String type)
                              throws LdapException
        Create a new attributeValue
        Parameters:
        type - The attribute's name (called 'type' in the grammar)
        Throws:
        LdapException - If the type can't be added
      • getCurrentAttributeType

        public String getCurrentAttributeType()
        Returns:
        Returns the currentAttribute type.
      • addAttributeValue

        public void addAttributeValue​(String value)
                               throws LdapException
        Add a new value to the current attribute
        Parameters:
        value - The value to add
        Throws:
        LdapException - If the value can't be added
      • addAttributeValue

        public void addAttributeValue​(Value value)
                               throws LdapException
        Add a new value to the current attribute
        Parameters:
        value - The value to add
        Throws:
        LdapException - If the value can't be added
      • addAttributeValue

        public void addAttributeValue​(byte[] value)
                               throws LdapException
        Add a new value to the current attribute
        Parameters:
        value - The value to add
        Throws:
        LdapException - If the value can't be added
      • getEntryDn

        public Dn getEntryDn()
        Gets the distinguished name of the entry to add.
        Specified by:
        getEntryDn in interface AddRequest
        Returns:
        the Dn of the added entry.
      • setEntryDn

        public AddRequest setEntryDn​(Dn dn)
        Sets the distinguished name of the entry to add.
        Specified by:
        setEntryDn in interface AddRequest
        Parameters:
        dn - the Dn of the added entry.
        Returns:
        The AddRequest instance
      • getEntry

        public Entry getEntry()
        Gets the entry to add.
        Specified by:
        getEntry in interface AddRequest
        Returns:
        the added Entry
      • setEntry

        public AddRequest setEntry​(Entry entry)
        Sets the Entry to add.
        Specified by:
        setEntry in interface AddRequest
        Parameters:
        entry - the added Entry
        Returns:
        The AddRequest instance
      • getResponseType

        public MessageTypeEnum getResponseType()
        Gets the protocol response message type for this request which produces at least one response.
        Specified by:
        getResponseType in interface SingleReplyRequest
        Returns:
        the message type of the response.
      • equals

        public boolean equals​(Object obj)
        Checks to see if an object is equivalent to this AddRequest. First there's a quick test to see if the obj is the same object as this one - if so true is returned. Next if the super method fails false is returned. Then the name of the entry is compared - if not the same false is returned. Lastly the attributes of the entry are compared. If they are not the same false is returned otherwise the method exists returning true.
        Overrides:
        equals in class AbstractRequest
        Parameters:
        obj - the object to test for equality to this
        Returns:
        true if the obj is equal to this AddRequest, false otherwise