Class DeleteRequestImpl
- 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.DeleteRequestImpl
-
- All Implemented Interfaces:
AbandonableRequest
,DeleteRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class DeleteRequestImpl extends AbstractAbandonableRequest implements DeleteRequest
Delete request implementation.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description DeleteRequestImpl()
Creates a DeleteRequest implementing object used to delete a leaf entry from the DIT.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeleteRequest
addAllControls(Control[] controls)
Adds an array of controls to this Message.DeleteRequest
addControl(Control control)
Adds a control to this Message.boolean
equals(Object obj)
Checks to see if an object is equivalent to this DeleteRequest.Dn
getName()
Gets the distinguished name of the leaf entry to be deleted by this request.MessageTypeEnum
getResponseType()
Gets the protocol response message type for this request which produces at least one response.DeleteResponse
getResultResponse()
The result containing response for this request.int
hashCode()
DeleteRequest
removeControl(Control control)
Deletes a control removing it from this Message.DeleteRequest
setMessageId(int messageId)
Sets the Message ID for this requestDeleteRequest
setName(Dn name)
Sets the distinguished name of the leaf entry to be deleted by this request.String
toString()
Return a String representing a DelRequest-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractAbandonableRequest
abandon, addAbandonListener, isAbandoned
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest
hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
get, getControl, getControls, getMessageId, getType, hasControl, put, toString
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
-
-
-
Constructor Detail
-
DeleteRequestImpl
public DeleteRequestImpl()
Creates a DeleteRequest implementing object used to delete a leaf entry from the DIT.
-
-
Method Detail
-
getName
public Dn getName()
Gets the distinguished name of the leaf entry to be deleted by this request.- Specified by:
getName
in interfaceDeleteRequest
- Returns:
- the Dn of the leaf entry to delete.
-
setName
public DeleteRequest setName(Dn name)
Sets the distinguished name of the leaf entry to be deleted by this request.- Specified by:
setName
in interfaceDeleteRequest
- Parameters:
name
- the Dn of the leaf entry to delete.- Returns:
- The DeleteRequest instance
-
setMessageId
public DeleteRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageId
in interfaceDeleteRequest
- Specified by:
setMessageId
in interfaceMessage
- Overrides:
setMessageId
in classAbstractMessage
- Parameters:
messageId
- The message Id- Returns:
- A Message reference
-
addControl
public DeleteRequest addControl(Control control)
Adds a control to this Message.- Specified by:
addControl
in interfaceDeleteRequest
- Specified by:
addControl
in interfaceMessage
- Overrides:
addControl
in classAbstractMessage
- Parameters:
control
- the control to add.- Returns:
- A Message reference
-
addAllControls
public DeleteRequest addAllControls(Control[] controls)
Adds an array of controls to this Message.- Specified by:
addAllControls
in interfaceDeleteRequest
- Specified by:
addAllControls
in interfaceMessage
- Overrides:
addAllControls
in classAbstractMessage
- Parameters:
controls
- the controls to add.- Returns:
- A Message reference
-
removeControl
public DeleteRequest removeControl(Control control)
Deletes a control removing it from this Message.- Specified by:
removeControl
in interfaceDeleteRequest
- Specified by:
removeControl
in interfaceMessage
- Overrides:
removeControl
in classAbstractMessage
- Parameters:
control
- the control to remove.- Returns:
- A Message reference
-
getResponseType
public MessageTypeEnum getResponseType()
Gets the protocol response message type for this request which produces at least one response.- Specified by:
getResponseType
in interfaceSingleReplyRequest
- Returns:
- the message type of the response.
-
getResultResponse
public DeleteResponse getResultResponse()
The result containing response for this request.- Specified by:
getResultResponse
in interfaceResultResponseRequest
- Returns:
- the result containing response for this request
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractRequest
- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
Checks to see if an object is equivalent to this DeleteRequest. 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. Finally the method exists returning true.- Overrides:
equals
in classAbstractRequest
- Parameters:
obj
- the object to test for equality to this- Returns:
- true if the obj is equal to this DeleteRequest, false otherwise
-
-