org.apache.directory.api.dsmlv2.request
Class DelRequestDsml

java.lang.Object
  extended by org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator<E>
      extended by org.apache.directory.api.dsmlv2.request.AbstractRequestDsml<E>
          extended by org.apache.directory.api.dsmlv2.request.AbstractResultResponseRequestDsml<DeleteRequest,DeleteResponse>
              extended by org.apache.directory.api.dsmlv2.request.DelRequestDsml
All Implemented Interfaces:
DsmlDecorator<DeleteRequest>, AbandonableRequest, DeleteRequest, Message, Request, ResultResponseRequest<DeleteResponse>, SingleReplyRequest<DeleteResponse>

public class DelRequestDsml
extends AbstractResultResponseRequestDsml<DeleteRequest,DeleteResponse>
implements DeleteRequest

DSML Decorator for DeleteRequest

Author:
Apache Directory Project

Field Summary
 
Fields inherited from interface org.apache.directory.api.ldap.model.message.DeleteRequest
RESP_TYPE, TYPE
 
Constructor Summary
DelRequestDsml(LdapApiService codec)
          Creates a new getDecoratedMessage() of DelRequestDsml.
DelRequestDsml(LdapApiService codec, DeleteRequest ldapMessage)
          Creates a new getDecoratedMessage() of DelRequestDsml.
 
Method Summary
 DeleteRequest addAllControls(Control[] controls)
          Adds an array of controls to this Message.
 DeleteRequest addControl(Control control)
          Adds a control to this Message.
 Dn getEntry()
          Get the entry to be deleted
 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.
 MessageTypeEnum getType()
          Gets the LDAP message type code associated with this Message.
 DeleteRequest removeControl(Control control)
          Deletes a control removing it from this Message.
 void setEntry(Dn entry)
          Set the entry to be deleted
 DeleteRequest setMessageId(int messageId)
          Sets the Message ID for this request
 DeleteRequest setName(Dn name)
          Sets the distinguished name of the leaf entry to be deleted by this request.
 org.dom4j.Element toDsml(org.dom4j.Element root)
          Creates the Request Element and adds RequestID and Controls.
 
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractResultResponseRequestDsml
abandon, addAbandonListener, computeLength, encode, getResultResponse, isAbandoned
 
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractRequestDsml
hasResponse
 
Methods inherited from class org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator
get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, hasControl, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, hasControl, put
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
 

Constructor Detail

DelRequestDsml

public DelRequestDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of DelRequestDsml.


DelRequestDsml

public DelRequestDsml(LdapApiService codec,
                      DeleteRequest ldapMessage)
Creates a new getDecoratedMessage() of DelRequestDsml.

Parameters:
ldapMessage - the message to decorate
Method Detail

getType

public MessageTypeEnum getType()
Gets the LDAP message type code associated with this Message. Each request and response type has a unique message type code defined by the protocol in RFC 2251.

Specified by:
getType in interface Message
Overrides:
getType in class AbstractDsmlMessageDecorator<DeleteRequest>
Returns:
the message type code.

toDsml

public org.dom4j.Element toDsml(org.dom4j.Element root)
Creates the Request Element and adds RequestID and Controls.

Specified by:
toDsml in interface DsmlDecorator<DeleteRequest>
Overrides:
toDsml in class AbstractResultResponseRequestDsml<DeleteRequest,DeleteResponse>
Parameters:
root - the root element
Returns:
the Request Element of the given name containing

getEntry

public Dn getEntry()
Get the entry to be deleted

Returns:
Returns the entry.

setEntry

public void setEntry(Dn entry)
Set the entry to be deleted

Parameters:
entry - The entry to set.

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<DeleteResponse>
Returns:
the message type of the response.

getName

public Dn getName()
Gets the distinguished name of the leaf entry to be deleted by this request.

Specified by:
getName in interface DeleteRequest
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 interface DeleteRequest
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 interface DeleteRequest
Specified by:
setMessageId in interface Message
Overrides:
setMessageId in class AbstractDsmlMessageDecorator<DeleteRequest>
Parameters:
messageId - The message Id
Returns:
A Message reference

addControl

public DeleteRequest addControl(Control control)
                         throws MessageException
Adds a control to this Message.

Specified by:
addControl in interface DeleteRequest
Specified by:
addControl in interface Message
Overrides:
addControl in class AbstractDsmlMessageDecorator<DeleteRequest>
Parameters:
control - the control to add.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or the control is not known etc.

addAllControls

public DeleteRequest addAllControls(Control[] controls)
                             throws MessageException
Adds an array of controls to this Message.

Specified by:
addAllControls in interface DeleteRequest
Specified by:
addAllControls in interface Message
Overrides:
addAllControls in class AbstractDsmlMessageDecorator<DeleteRequest>
Parameters:
controls - the controls to add.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or they are not known etc.

removeControl

public DeleteRequest removeControl(Control control)
                            throws MessageException
Deletes a control removing it from this Message.

Specified by:
removeControl in interface DeleteRequest
Specified by:
removeControl in interface Message
Overrides:
removeControl in class AbstractDsmlMessageDecorator<DeleteRequest>
Parameters:
control - the control to remove.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or the control is not known etc.


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.