Class AddRequestImpl
java.lang.Object
org.apache.directory.api.ldap.model.message.AbstractMessage
org.apache.directory.api.ldap.model.message.AbstractRequest
org.apache.directory.api.ldap.model.message.AbstractAbandonableRequest
org.apache.directory.api.ldap.model.message.AddRequestImpl
- All Implemented Interfaces:
AbandonableRequest, AddRequest, Message, Request, ResultResponseRequest, SingleReplyRequest
Lockable add request implementation.
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from class AbstractMessage
controls -
Constructor Summary
ConstructorsConstructorDescriptionCreates an AddRequest implementation to create a new entry. -
Method Summary
Modifier and TypeMethodDescriptionaddAllControls(Control[] controls) Adds an array of controls to this Message.voidaddAttributeType(String type) Create a new attributeValuevoidaddAttributeValue(byte[] value) Add a new value to the current attributevoidaddAttributeValue(String value) Add a new value to the current attributevoidaddAttributeValue(Value value) Add a new value to the current attributeaddControl(Control control) Adds a control to this Message.booleanChecks to see if an object is equivalent to this AddRequest.Get the currentAttribute type.getEntry()Gets the entry to add.Gets the distinguished name of the entry to add.Gets the protocol response message type for this request which produces at least one response.The result containing response for this request.inthashCode()removeControl(Control control) Deletes a control removing it from this Message.Sets the Entry to add.setEntryDn(Dn dn) Sets the distinguished name of the entry to add.setMessageId(int messageId) Sets the Message ID for this requesttoString()Methods inherited from class AbstractAbandonableRequest
abandon, addAbandonListener, isAbandonedMethods inherited from class AbstractRequest
hasResponseMethods inherited from class AbstractMessage
get, getControl, getControls, getMessageId, getType, hasControl, put, toStringMethods inherited from interface AbandonableRequest
abandon, addAbandonListener, isAbandonedMethods inherited from interface Message
get, getControl, getControls, getMessageId, getType, hasControl, putMethods inherited from interface Request
hasResponse
-
Constructor Details
-
AddRequestImpl
public AddRequestImpl()Creates an AddRequest implementation to create a new entry.
-
-
Method Details
-
addAttributeType
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
Get the currentAttribute type.- Returns:
- Returns the currentAttribute type.
-
addAttributeValue
Add a new value to the current attribute- Parameters:
value- The value to add- Throws:
LdapException- If the value can't be added
-
addAttributeValue
Add a new value to the current attribute- Parameters:
value- The value to add- Throws:
LdapException- If the value can't be added
-
addAttributeValue
Add a new value to the current attribute- Parameters:
value- The value to add- Throws:
LdapException- If the value can't be added
-
getEntryDn
Gets the distinguished name of the entry to add.- Specified by:
getEntryDnin interfaceAddRequest- Returns:
- the Dn of the added entry.
-
setEntryDn
Sets the distinguished name of the entry to add.- Specified by:
setEntryDnin interfaceAddRequest- Parameters:
dn- the Dn of the added entry.- Returns:
- The AddRequest instance
-
getEntry
Gets the entry to add.- Specified by:
getEntryin interfaceAddRequest- Returns:
- the added Entry
-
setEntry
Sets the Entry to add.- Specified by:
setEntryin interfaceAddRequest- Parameters:
entry- the added Entry- Returns:
- The AddRequest instance
-
setMessageId
Sets the Message ID for this request- Specified by:
setMessageIdin interfaceAddRequest- Specified by:
setMessageIdin interfaceMessage- Overrides:
setMessageIdin classAbstractMessage- Parameters:
messageId- The message Id- Returns:
- A Message reference
-
addControl
Adds a control to this Message.- Specified by:
addControlin interfaceAddRequest- Specified by:
addControlin interfaceMessage- Overrides:
addControlin classAbstractMessage- Parameters:
control- the control to add.- Returns:
- A Message reference
-
addAllControls
Adds an array of controls to this Message.- Specified by:
addAllControlsin interfaceAddRequest- Specified by:
addAllControlsin interfaceMessage- Overrides:
addAllControlsin classAbstractMessage- Parameters:
controls- the controls to add.- Returns:
- A Message reference
-
removeControl
Deletes a control removing it from this Message.- Specified by:
removeControlin interfaceAddRequest- Specified by:
removeControlin interfaceMessage- Overrides:
removeControlin classAbstractMessage- Parameters:
control- the control to remove.- Returns:
- A Message reference
-
getResponseType
Gets the protocol response message type for this request which produces at least one response.- Specified by:
getResponseTypein interfaceSingleReplyRequest- Returns:
- the message type of the response.
-
getResultResponse
The result containing response for this request.- Specified by:
getResultResponsein interfaceResultResponseRequest- Returns:
- the result containing response for this request
-
equals
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:
equalsin classAbstractRequest- Parameters:
obj- the object to test for equality to this- Returns:
- true if the obj is equal to this AddRequest, false otherwise
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractRequest- Returns:
- the instance's hash code
- See Also:
-
toString
-