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

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

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-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 );
}
org.apache.directory.server.core.api.interceptor.contextRenameOperationContextsetModifiedEntry

Popular methods of RenameOperationContext

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • 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