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

How to use
getEntry
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.getEntry (Showing top 7 results out of 315)

origin: org.apache.directory.server/apacheds-interceptors-admin

  /**
   * {@inheritDoc}
   */
  @Override
  public void rename( RenameOperationContext renameContext ) throws LdapException
  {
    LOG.debug( ">>> Entering into the Administrative Interceptor, renameRequest" );
    Entry entry = renameContext.getEntry();

    // Check if we are renaming an Administrative Point
    Attribute adminPoint = entry.get( directoryService.getAtProvider().getAdministrativeRole() );

    if ( adminPoint == null )
    {
      // Nope, go on.
      next( renameContext );

      LOG.debug( "Exit from Administrative Interceptor" );

      return;
    }

    // Else throw an UnwillingToPerform exception ATM
    String message = "Cannot rename an Administrative Point in the current version";
    LOG.error( message );
    throw new LdapUnwillingToPerformException( message );
  }
}
origin: org.apache.directory.server/apacheds-core-jndi

  public void entryRenamed( RenameOperationContext renameContext )
  {
    try
    {
      if ( listener instanceof NamespaceChangeListener )
      {
        Binding newBinding = new Binding( renameContext.getDn().getName(),
          ServerEntryUtils.toBasicAttributes( renameContext.getEntry() ), false );
        Binding oldBinding = new Binding( renameContext.getDn().getName(),
          ServerEntryUtils.toBasicAttributes( ( ( ClonedServerEntry ) renameContext.getEntry() )
            .getOriginalEntry() ), false );
        NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED,
          newBinding, oldBinding, null );
        ( ( NamespaceChangeListener ) listener ).objectRenamed( evt );
      }
    }
    catch ( Exception e )
    {
      deliverNamingExceptionEvent( e );
    }
  }
}
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-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

Entry renamedEntry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getClonedEntry();
origin: org.apache.directory.server/apacheds-interceptors-operational

/**
 * {@inheritDoc}
 */
@Override
public void rename( RenameOperationContext renameContext ) throws LdapException
{
  Entry entry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getClonedEntry();
  entry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( renameContext ).getName() );
  entry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
  Entry modifiedEntry = renameContext.getOriginalEntry().clone();
  modifiedEntry.put( SchemaConstants.MODIFIERS_NAME_AT, getPrincipal( renameContext ).getName() );
  modifiedEntry.put( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
  Attribute csnAt = new DefaultAttribute( directoryService.getAtProvider().getEntryCSN(), directoryService
    .getCSN().toString() );
  modifiedEntry.put( csnAt );
  renameContext.setModifiedEntry( modifiedEntry );
  next( renameContext );
}
origin: org.apache.directory.server/apacheds-interceptors-subtree

Entry entry = ( ( ClonedServerEntry ) renameContext.getEntry() ).getClonedEntry();
org.apache.directory.server.core.api.interceptor.contextRenameOperationContextgetEntry

Popular methods of RenameOperationContext

  • getDn
  • getNewRdn
  • <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
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Top PhpStorm plugins
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