Class DeleteRequestDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.RequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator<DeleteRequest>
-
- org.apache.directory.api.ldap.codec.decorators.DeleteRequestDecorator
-
- All Implemented Interfaces:
Asn1Object
,Decorator<DeleteRequest>
,AbandonableRequest
,DeleteRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class DeleteRequestDecorator extends SingleReplyRequestDecorator<DeleteRequest> implements DeleteRequest
A decorator for the DeleteRequest message- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description DeleteRequestDecorator(LdapApiService codec, DeleteRequest decoratedMessage)
Makes a DeleteRequest a MessageDecorator.
-
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.int
computeLength()
Compute the DelRequest length
DelRequest :ByteBuffer
encode(ByteBuffer buffer)
Encode the DelRequest message to a PDU.Dn
getName()
Gets the distinguished name of the leaf entry to be deleted by this request.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.-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator
abandon, addAbandonListener, getResponseType, isAbandoned
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator
getResultResponse, hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest
getResponseType
-
-
-
-
Constructor Detail
-
DeleteRequestDecorator
public DeleteRequestDecorator(LdapApiService codec, DeleteRequest decoratedMessage)
Makes a DeleteRequest a MessageDecorator.- Parameters:
codec
- The LDAP service instancedecoratedMessage
- the decorated DeleteRequest
-
-
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 classMessageDecorator<DeleteRequest>
- 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 classMessageDecorator<DeleteRequest>
- 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 classMessageDecorator<DeleteRequest>
- 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 classMessageDecorator<DeleteRequest>
- Parameters:
control
- the control to remove.- Returns:
- A Message reference
-
computeLength
public int computeLength()
Compute the DelRequest length
DelRequest :0x4A L1 entry L1 = Length(entry) Length(DelRequest) = Length(0x4A) + Length(L1) + L1
- Specified by:
computeLength
in interfaceAsn1Object
- Returns:
- The object's computed length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the DelRequest message to a PDU.
DelRequest :0x4A LL entry
- Specified by:
encode
in interfaceAsn1Object
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The encoded PDU.
- Throws:
EncoderException
- if the buffer can't be encoded
-
-