Tabnine Logo
RenameOperationContext.getNewRdn
Code IndexAdd Tabnine to your IDE (free)

How to use
getNewRdn
method
in
org.apache.directory.server.core.api.interceptor.context.RenameOperationContext

Best Java code snippets using org.apache.directory.server.core.api.interceptor.context.RenameOperationContext.getNewRdn (Showing top 6 results out of 315)

origin: org.apache.directory.server/apacheds-core-api

/**
 * Rename a Schema Object.
 *
 * @param renameContext The contect contaoning the rename informations
 * @param doCascadeModify unused
 * @throws LdapException If the rename failed
 */
public void rename( RenameOperationContext renameContext, boolean doCascadeModify )
  throws LdapException
{
  Entry originalEntry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getOriginalEntry();
  Attribute oc = originalEntry.get( objectClassAT );
  for ( Value value : oc )
  {
    String oid = schemaManager.getObjectClassRegistry().getOidByName( value.getValue() );
    if ( objectClass2synchronizerMap.containsKey( oid ) )
    {
      RegistrySynchronizer synchronizer = objectClass2synchronizerMap.get( oid );
      synchronizer.rename( originalEntry, renameContext.getNewRdn(), doCascadeModify );
      return;
    }
  }
  if ( oc.contains( MetaSchemaConstants.META_SCHEMA_OC ) )
  {
    schemaSynchronizer.rename( originalEntry, renameContext.getNewRdn(), doCascadeModify );
    return;
  }
  throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM );
}
origin: org.apache.directory.server/apacheds-ldif-partition

/**
 * {@inheritDoc}
 */
public void rename( RenameOperationContext renameContext ) throws LdapException
{
  PartitionTxn partitionTxn = renameContext.getTransaction(); 
  Dn oldDn = renameContext.getDn();
  String entryId = getEntryId( partitionTxn, oldDn );
  // Create the new entry
  super.rename( renameContext );
  // Get the modified entry and store it in the context for post usage
  Dn newDn = oldDn.getParent().add( renameContext.getNewRdn() );
  Entry modifiedEntry = fetch( renameContext.getTransaction(), entryId, newDn );
  renameContext.setModifiedEntry( modifiedEntry );
  // Now move the potential children for the old entry
  // and remove the old entry
  try
  {
    entryMoved( partitionTxn, oldDn, modifiedEntry, entryId );
  }
  catch ( Exception e )
  {
    throw new LdapOperationErrorException( e.getMessage(), e );
  }
}
origin: org.apache.directory.server/apacheds-interceptors-changelog

/**
 * {@inheritDoc}
 */
@Override
public void rename( RenameOperationContext renameContext ) throws LdapException
{
  Entry serverEntry = null;
  if ( renameContext.getEntry() != null )
  {
    serverEntry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getOriginalEntry();
  }
  next( renameContext );
  // After this point, the entry has been modified. The cloned entry contains
  // the modified entry, the originalEntry has changed
  if ( !changeLog.isEnabled() )
  {
    return;
  }
  LdifEntry forward = new LdifEntry();
  forward.setChangeType( ChangeType.ModRdn );
  forward.setDn( renameContext.getDn() );
  forward.setNewRdn( renameContext.getNewRdn().getName() );
  forward.setDeleteOldRdn( renameContext.getDeleteOldRdn() );
  List<LdifEntry> reverses = LdifRevertor.reverseRename(
    serverEntry, renameContext.getNewRdn(), renameContext.getDeleteOldRdn() );
  renameContext.setChangeLogEvent( changeLog.log( getPrincipal( renameContext ), forward, reverses ) );
}
origin: org.apache.directory.server/apacheds-interceptors-trigger

Rdn newRdn = renameContext.getNewRdn();
boolean deleteOldRn = renameContext.getDeleteOldRdn();
origin: org.apache.directory.server/apacheds-interceptors-journal

ldif.setChangeType( ChangeType.ModRdn );
ldif.setDn( renameContext.getDn() );
ldif.setNewRdn( renameContext.getNewRdn().getName() );
ldif.setDeleteOldRdn( renameContext.getDeleteOldRdn() );
origin: org.apache.directory.server/apacheds-interceptors-subtree

Dn newName = oldDn.getParent();
newName = newName.add( renameContext.getNewRdn() );
org.apache.directory.server.core.api.interceptor.contextRenameOperationContextgetNewRdn

Popular methods of RenameOperationContext

  • getDn
  • getEntry
  • <init>
    Creates a new instance of RenameOperationContext.
  • getDeleteOldRdn
  • getResponseControls
  • getTransaction
  • setModifiedEntry
  • addRequestControls
  • getModifiedEntry
  • getNewDn
  • getOriginalEntry
  • getPartition
  • getOriginalEntry,
  • getPartition,
  • getSession,
  • hasRequestControl,
  • ignoreReferral,
  • setChangeLogEvent,
  • setInterceptors,
  • setLogChange,
  • setReplEvent

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now