org.apache.directory.shared.ldap.message
Class AddRequestImpl

java.lang.Object
  extended byorg.apache.directory.shared.ldap.message.AbstractMessage
      extended byorg.apache.directory.shared.ldap.message.AbstractRequest
          extended byorg.apache.directory.shared.ldap.message.AbstractAbandonableRequest
              extended byorg.apache.directory.shared.ldap.message.AddRequestImpl
All Implemented Interfaces:
AbandonableRequest, AddRequest, Message, Request, ResultResponseRequest, SingleReplyRequest

public class AddRequestImpl
extends AbstractAbandonableRequest
implements AddRequest

Lockable add request implemenation.

Version:
$Rev: 379590 $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from interface org.apache.directory.shared.ldap.message.AddRequest
RESP_TYPE, TYPE
 
Constructor Summary
AddRequestImpl(int id)
          Creates an AddRequest implementation to create a new entry.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks to see if an object is equivalent to this AddRequest.
 javax.naming.directory.Attributes getAttributes()
          Gets the attribute value pairs of the entry to add as a MultiMap.
 java.lang.String getEntry()
          Gets the distinguished name of the entry to add.
 MessageTypeEnum getResponseType()
          Gets the protocol response message type for this request which produces at least one response.
 ResultResponse getResultResponse()
          The result containing response for this request.
 void setAttributes(javax.naming.directory.Attributes attributes)
          Sets the attribute value pairs of the entry to add as a MultiMap.
 void setEntry(java.lang.String entry)
          Sets the distinguished name of the entry to add.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractAbandonableRequest
abandon, addAbandonListener, isAbandoned
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractRequest
hasResponse
 
Methods inherited from class org.apache.directory.shared.ldap.message.AbstractMessage
add, get, getControls, getMessageId, getType, put, remove
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.message.Message
add, get, getControls, getMessageId, getType, put, remove
 
Methods inherited from interface org.apache.directory.shared.ldap.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
 

Constructor Detail

AddRequestImpl

public AddRequestImpl(int id)
Creates an AddRequest implementation to create a new entry.

Parameters:
id - the sequence identifier of the AddRequest message.
Method Detail

getEntry

public java.lang.String getEntry()
Gets the distinguished name of the entry to add.

Specified by:
getEntry in interface AddRequest
Returns:
the Dn of the added entry.

setEntry

public void setEntry(java.lang.String entry)
Sets the distinguished name of the entry to add.

Specified by:
setEntry in interface AddRequest
Parameters:
entry - the Dn of the added entry.

getAttributes

public javax.naming.directory.Attributes getAttributes()
Gets the attribute value pairs of the entry to add as a MultiMap.

Specified by:
getAttributes in interface AddRequest
Returns:
the Attribute with attribute value pairs.

setAttributes

public void setAttributes(javax.naming.directory.Attributes attributes)
Sets the attribute value pairs of the entry to add as a MultiMap.

Specified by:
setAttributes in interface AddRequest
Parameters:
attributes - the Attributes with attribute value pairs for the added entry.

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

getResultResponse

public ResultResponse getResultResponse()
The result containing response for this request.

Specified by:
getResultResponse in interface ResultResponseRequest
Returns:
the result containing response for this request

equals

public boolean equals(java.lang.Object obj)
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:
equals in class AbstractMessage
Parameters:
obj - the object to test for equality to this
Returns:
true if the obj is equal to this AddRequest, false otherwise

toString

public java.lang.String toString()


Copyright © 2003-2006 . All Rights Reserved.