org.apache.directory.api.ldap.model.message
Interface AddRequest

All Superinterfaces:
AbandonableRequest, Message, Request, ResultResponseRequest<AddResponse>, SingleReplyRequest<AddResponse>
All Known Implementing Classes:
AddRequestImpl

public interface AddRequest
extends SingleReplyRequest<AddResponse>, AbandonableRequest

Add protocol operation request used to add a new entry to the DIT.

Author:
Apache Directory Project

Field Summary
static MessageTypeEnum RESP_TYPE
          LDAPv3 add response type enum code
static MessageTypeEnum TYPE
          LDAPv3 add request type enum code
 
Method Summary
 AddRequest addAllControls(Control[] controls)
          Adds an array of controls to this Message.
 AddRequest addControl(Control control)
          Adds a control to this Message.
 Entry getEntry()
          Gets the entry to add.
 Dn getEntryDn()
          Gets the distinguished name of the entry to add.
 AddRequest removeControl(Control control)
          Deletes a control removing it from this Message.
 AddRequest setEntry(Entry entry)
          Sets the Entry to add.
 AddRequest setEntryDn(Dn entry)
          Sets the distinguished name of the entry to add.
 AddRequest setMessageId(int messageId)
          Sets the Message ID for this request
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest
getResponseType
 
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, getType, hasControl, put
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
 

Field Detail

TYPE

static final MessageTypeEnum TYPE
LDAPv3 add request type enum code


RESP_TYPE

static final MessageTypeEnum RESP_TYPE
LDAPv3 add response type enum code

Method Detail

getEntryDn

Dn getEntryDn()
Gets the distinguished name of the entry to add.

Returns:
the Dn of the added entry.

setEntryDn

AddRequest setEntryDn(Dn entry)
Sets the distinguished name of the entry to add.

Parameters:
entry - the Dn of the added entry.
Returns:
The AddRequest instance

getEntry

Entry getEntry()
Gets the entry to add.

Returns:
the added Entry

setEntry

AddRequest setEntry(Entry entry)
Sets the Entry to add.

Parameters:
entry - the added Entry
Returns:
The AddRequest instance

setMessageId

AddRequest setMessageId(int messageId)
Sets the Message ID for this request

Specified by:
setMessageId in interface Message
Parameters:
messageId - The message Id
Returns:
A Message reference

addControl

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

Specified by:
addControl in interface Message
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

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

Specified by:
addAllControls in interface Message
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

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

Specified by:
removeControl in interface Message
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.