org.apache.directory.ldap.client.api.message
Class ModifyRequest

java.lang.Object
  extended by org.apache.directory.ldap.client.api.message.AbstractMessage
      extended by org.apache.directory.ldap.client.api.message.AbstractRequest
          extended by org.apache.directory.ldap.client.api.message.ModifyRequest
All Implemented Interfaces:
AbandonableRequest, Message, Request, RequestWithResponse

public class ModifyRequest
extends AbstractRequest
implements RequestWithResponse, AbandonableRequest

ModificationRequest for performing modify operation.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
ModifyRequest(org.apache.directory.shared.ldap.name.DN dn)
          Creates a new instance of ModifyRequest.
 
Method Summary
 void add(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          marks a given attribute for addition in the target entry.
 void add(java.lang.String attributeName, byte[]... attributeValue)
           
 void add(java.lang.String attributeName, java.lang.String... attributeValue)
          marks a given attribute for addition in the target entry with the given values.
 void addModification(org.apache.directory.shared.ldap.entry.EntryAttribute attr, org.apache.directory.shared.ldap.entry.ModificationOperation modOp)
           
 void addModification(org.apache.directory.shared.ldap.entry.Modification... modifications)
           
 org.apache.directory.shared.ldap.name.DN getDn()
           
 java.util.List<org.apache.directory.shared.ldap.entry.Modification> getMods()
           
 void remove(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          marks a given attribute for removal from the target entry.
 void remove(java.lang.String attributeName, byte[]... attributeValue)
           
 void remove(java.lang.String attributeName, java.lang.String... attributeValue)
          marks a given attribute for removal with the given values from the target entry.
 void replace(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
          marks a given attribute for replacement in the target entry.
 void replace(java.lang.String attributeName, byte[]... attributeValue)
           
 void replace(java.lang.String attributeName, java.lang.String... attributeValue)
          marks a given attribute for replacement with the given values in the target entry.
 
Methods inherited from class org.apache.directory.ldap.client.api.message.AbstractRequest
getTimeout, setTimeout
 
Methods inherited from class org.apache.directory.ldap.client.api.message.AbstractMessage
add, getControl, getControls, getMessageId, hasControl, remove, setMessageId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.ldap.client.api.message.Request
getTimeout, setTimeout
 
Methods inherited from interface org.apache.directory.ldap.client.api.message.Message
add, getControl, getControls, getMessageId, hasControl, remove, setMessageId
 

Constructor Detail

ModifyRequest

public ModifyRequest(org.apache.directory.shared.ldap.name.DN dn)
Creates a new instance of ModifyRequest.

Parameters:
dn - DN of the Entry to be modified
Method Detail

add

public void add(java.lang.String attributeName,
                java.lang.String... attributeValue)
marks a given attribute for addition in the target entry with the given values.

Parameters:
attributeName - name of the attribute to be added
attributeValue - values of the attribute

add

public void add(java.lang.String attributeName,
                byte[]... attributeValue)
See Also:
add(String, String...)

add

public void add(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
marks a given attribute for addition in the target entry.

Parameters:
attr - the attribute to be added

replace

public void replace(java.lang.String attributeName,
                    java.lang.String... attributeValue)
marks a given attribute for replacement with the given values in the target entry.

Parameters:
attributeName - name of the attribute to be added
attributeValue - values of the attribute

replace

public void replace(java.lang.String attributeName,
                    byte[]... attributeValue)
See Also:
remove(String, String...)

replace

public void replace(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
marks a given attribute for replacement in the target entry.

Parameters:
attr - the attribute to be added

remove

public void remove(java.lang.String attributeName,
                   java.lang.String... attributeValue)
marks a given attribute for removal with the given values from the target entry.

Parameters:
attributeName - name of the attribute to be added
attributeValue - values of the attribute

remove

public void remove(java.lang.String attributeName,
                   byte[]... attributeValue)
See Also:
remove(String, String...)

remove

public void remove(org.apache.directory.shared.ldap.entry.EntryAttribute attr)
marks a given attribute for removal from the target entry.

Parameters:
attr - the attribute to be added

addModification

public void addModification(org.apache.directory.shared.ldap.entry.EntryAttribute attr,
                            org.apache.directory.shared.ldap.entry.ModificationOperation modOp)

addModification

public void addModification(org.apache.directory.shared.ldap.entry.Modification... modifications)

getDn

public org.apache.directory.shared.ldap.name.DN getDn()
Returns:
the target entry's DN

getMods

public java.util.List<org.apache.directory.shared.ldap.entry.Modification> getMods()
Returns:
the list of modifications


Copyright © 2009-2011 Apache Software Foundation. All Rights Reserved.