org.apache.directory.server.ldap.handlers
Class ModifyDnHandler

java.lang.Object
  extended by org.apache.directory.server.ldap.handlers.LdapRequestHandler<T>
      extended by org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler<org.apache.directory.shared.ldap.message.ModifyDnRequest>
          extended by org.apache.directory.server.ldap.handlers.ModifyDnHandler
All Implemented Interfaces:
org.apache.mina.handler.demux.MessageHandler<org.apache.directory.shared.ldap.message.ModifyDnRequest>

public class ModifyDnHandler
extends ReferralAwareRequestHandler<org.apache.directory.shared.ldap.message.ModifyDnRequest>

A single reply handler for ModifyDnRequests.

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

Field Summary
 
Fields inherited from class org.apache.directory.server.ldap.handlers.LdapRequestHandler
ldapService
 
Fields inherited from interface org.apache.mina.handler.demux.MessageHandler
NOOP
 
Constructor Summary
ModifyDnHandler()
           
 
Method Summary
 void handleIgnoringReferrals(LdapSession session, org.apache.directory.shared.ldap.name.LdapDN reqTargetDn, ClonedServerEntry entry, org.apache.directory.shared.ldap.message.ModifyDnRequest req)
          Deal with a ModifyDN request received from a client.
 
Methods inherited from class org.apache.directory.server.ldap.handlers.ReferralAwareRequestHandler
getFarthestReferralAncestor, getReferralOnAncestor, getReferralOnAncestorForSearch, handle, handleException, isEntryReferral
 
Methods inherited from class org.apache.directory.server.ldap.handlers.LdapRequestHandler
getLdapServer, isConfidentialityRequirementSatisfied, messageReceived, rejectWithoutConfidentiality, setLdapServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifyDnHandler

public ModifyDnHandler()
Method Detail

handleIgnoringReferrals

public void handleIgnoringReferrals(LdapSession session,
                                    org.apache.directory.shared.ldap.name.LdapDN reqTargetDn,
                                    ClonedServerEntry entry,
                                    org.apache.directory.shared.ldap.message.ModifyDnRequest req)
Deal with a ModifyDN request received from a client. A ModifyDN operation has more than one semantic, depending on its parameters. In any case, the first argument is the DN entry to be changed. We then have the new relative DN for this entry. Two other arguments can be provided : - deleteOldRdn : if the old RDN attributes should be removed from the new entry or not (for instance, if the old RDN was cn=acme, and the new one is sn=acme, then we may have to remove the cn: acme from the attributes list) - newSuperior : this is a move operation. The entry is removed from its current location, and created in the new one.

Specified by:
handleIgnoringReferrals in class ReferralAwareRequestHandler<org.apache.directory.shared.ldap.message.ModifyDnRequest>
Parameters:
session - the LDAP session under which processing occurs
reqTargetDn - the target entry DN associated with the request
entry - the target entry if it exists and has been looked up, may be null even if the entry exists, offered in case the entry is looked up to avoid repeat lookups. Implementations should check if the entry is null and attempt a lookup instead of presuming the entry does not exist.
req - the request to be handled


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