congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ChangeLog.isEnabled
Code IndexAdd Tabnine to your IDE (free)

How to use
isEnabled
method
in
org.apache.directory.server.core.api.changelog.ChangeLog

Best Java code snippets using org.apache.directory.server.core.api.changelog.ChangeLog.isEnabled (Showing top 12 results out of 315)

origin: org.apache.directory.server/apacheds-test-framework

private long getCurrentRevision( DirectoryService dirService ) throws Exception
{
  if ( ( dirService != null ) && ( dirService.getChangeLog().isEnabled() ) )
  {
    long revision = dirService.getChangeLog().getCurrentRevision();
    LOG.debug( "Create revision {}", revision );
    return revision;
  }
  return 0;
}
origin: org.apache.directory.server/apacheds-test-framework

private void revert( DirectoryService dirService, long revision ) throws Exception
{
  if ( dirService == null )
  {
    return;
  }
  ChangeLog cl = dirService.getChangeLog();
  if ( cl.isEnabled() && ( revision < cl.getCurrentRevision() ) )
  {
    LOG.debug( "Revert revision {}", revision );
    dirService.revert( revision );
  }
}
origin: org.apache.directory.server/apacheds-test-framework

if ( directoryService != null && directoryService.getChangeLog().isEnabled() )
origin: org.apache.knox/gateway-test-ldap

public long revert() throws LdapException
{
 if ( changeLog == null || !changeLog.isEnabled() )
 {
  throw new IllegalStateException( I18n.err( I18n.ERR_310 ) );
 }
 Tag latest = changeLog.getLatest();
 if ( null != latest )
 {
  if ( latest.getRevision() < changeLog.getCurrentRevision() )
  {
   return revert( latest.getRevision() );
  }
  else
  {
   LOG.info( "Ignoring request to revert without changes since the latest tag." );
   return changeLog.getCurrentRevision();
  }
 }
 throw new IllegalStateException( I18n.err( I18n.ERR_311 ) );
}
origin: org.apache.directory.server/apacheds-interceptors-changelog

boolean isDelete = modification != null;
if ( !isDelete && ( changeLog.isEnabled() ) )
  || !changeLog.isEnabled()
origin: org.apache.knox/gateway-test-ldap

public long revert( long revision ) throws LdapException
 if ( changeLog == null || !changeLog.isEnabled() )
origin: org.apache.directory.server/apacheds-interceptors-changelog

if ( changeLog.isEnabled() )
if ( !changeLog.isEnabled() )
origin: org.apache.directory.server/apacheds-interceptors-changelog

if ( changeLog.isEnabled() )
if ( !changeLog.isEnabled() )
origin: org.apache.directory.server/apacheds-interceptors-changelog

/**
 * {@inheritDoc}
 */
@Override
public void move( MoveOperationContext moveContext ) throws LdapException
{
  next( moveContext );
  if ( !changeLog.isEnabled() )
  {
    return;
  }
  LdifEntry forward = new LdifEntry();
  forward.setChangeType( ChangeType.ModDn );
  forward.setDn( moveContext.getDn() );
  forward.setNewSuperior( moveContext.getNewSuperior().getName() );
  LdifEntry reverse = LdifRevertor.reverseMove( moveContext.getNewSuperior(), moveContext.getDn() );
  moveContext.setChangeLogEvent( changeLog.log( getPrincipal( moveContext ), forward, reverse ) );
}
origin: org.apache.knox/gateway-test-ldap

if ( changeLog.isEnabled() )
origin: org.apache.directory.server/apacheds-interceptors-changelog

/**
 * {@inheritDoc}
 */
@Override
public void add( AddOperationContext addContext ) throws LdapException
{
  next( addContext );
  if ( !changeLog.isEnabled() )
  {
    return;
  }
  Entry addEntry = addContext.getEntry();
  // we don't want to record addition of a tag as a change
  if ( addEntry.get( REV_AT_OID ) != null )
  {
    return;
  }
  LdifEntry forward = new LdifEntry();
  forward.setChangeType( ChangeType.Add );
  forward.setDn( addContext.getDn() );
  for ( Attribute attribute : addEntry.getAttributes() )
  {
    AttributeType attributeType = attribute.getAttributeType();
    forward.addAttribute( addEntry.get( attributeType ).clone() );
  }
  LdifEntry reverse = LdifRevertor.reverseAdd( addContext.getDn() );
  addContext.setChangeLogEvent( changeLog.log( getPrincipal( addContext ), forward, reverse ) );
}
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 ) );
}
org.apache.directory.server.core.api.changelogChangeLogisEnabled

Javadoc

Checks whether or not the change log has been enabled to track changes.

Popular methods of ChangeLog

  • setEnabled
    Enable or disable the ChangeLog service
  • getCurrentRevision
    Gets the current revision for the server.
  • destroy
    Destroy the changeLog
  • getChangeLogStore
  • getLatest
  • init
    Initialize the ChangeLog system.
  • isExposed
  • isTagSearchSupported
    Returns whether or not this ChangeLogService supports searching for snapshot tags.
  • log
    Records a change as a forward LDIF, a reverse change to revert the change and the authorized princip
  • setExposed
    Exposes the contents of ChangeLog to clients if set to true. Default setting is false.
  • sync
    Flush the changes to disk
  • tag
    Creates a snapshot of the server at the current revision.
  • sync,
  • tag

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Notification (javax.management)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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