Codota Logo
RepositoryInitializationHandler
Code IndexAdd Codota to your IDE (free)

How to use
RepositoryInitializationHandler
in
org.nuxeo.ecm.core.repository

Best Java code snippets using org.nuxeo.ecm.core.repository.RepositoryInitializationHandler (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: org.nuxeo.ecm.platform/nuxeo-platform-content-template-manager

@Override
public void deactivate(ComponentContext context) {
  if (initializationHandler != null) {
    initializationHandler.uninstall();
  }
}
origin: org.nuxeo.ecm.core/nuxeo-core

/**
 * Must be implemented by custom initializers.
 *
 * @param session the current session
 */
public void initializeRepository(CoreSession session) {
  synchronized (RepositoryInitializationHandler.class) {
    if (previous != null) {
      previous.initializeRepository(session);
    }
    doInitializeRepository(session);
  }
}
origin: org.nuxeo.ecm.routing/nuxeo-routing-core

@Override
public void activate(ComponentContext context) {
  super.activate(context);
  modelsChache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(10, TimeUnit.MINUTES).build();
  repositoryInitializationHandler = new RouteModelsInitializator();
  repositoryInitializationHandler.install();
}
origin: org.nuxeo.ecm.core/nuxeo-core

  @Override
  public void run() {
    handler.initializeRepository(session);
  }
}.runUnrestricted();
origin: org.nuxeo.ecm.core/nuxeo-core

/**
 * Initializes all the repositories. Requires an active transaction.
 *
 * @since 9.3
 */
protected void doInitRepositories() {
  // give up if no handler configured
  RepositoryInitializationHandler handler = RepositoryInitializationHandler.getInstance();
  if (handler == null) {
    return;
  }
  // invoke handlers
  for (String name : getRepositoryNames()) {
    initializeRepository(handler, name);
  }
}
origin: org.nuxeo.ecm.platform/nuxeo-platform-content-template-manager

@Override
public void activate(ComponentContext context) {
  // register our Repo init listener
  initializationHandler = new RepositoryInitializationListener();
  initializationHandler.install();
  factoryBindings = new FactoryBindingRegistry();
  postContentCreationHandlers = new PostContentCreationHandlerRegistry();
}
origin: org.nuxeo.ecm.routing/nuxeo-routing-core

@Override
public void deactivate(ComponentContext context) {
  super.deactivate(context);
  if (repositoryInitializationHandler != null) {
    repositoryInitializationHandler.uninstall();
  }
}
org.nuxeo.ecm.core.repositoryRepositoryInitializationHandler

Javadoc

A repository initialization handler is responsible for initializing a repository content.

The handler is called each time a repository is opened in a JVM session. This can be used to create a default structure for the repository.

To register a repository initializer MyInitHandler you should do:

RepositoryInitializationHandler.setInstance(new MyInitHandler());

If you want to create an initialization chain you can implement to delegate to the parent handle the default initialization and then to do your specific initialization stuff

 
 
RepositoryInitializationHandler parentHandler = RepositoryInitializationHandler.getInstance(); 
MyInitHandler myHandler = new MyInitHandler(parentHandler); 
RepositoryInitializationHandler.setInstance(myHandler); 
... 
class MyHandler extends RepositoryInitializationHandler { 
... 
public initializeRepository(CoreSession session) { 
if (parentHandler != null) parentHandler.initializeRepository(session); 
// do my own initialization here 
... 
} 
... 
} 
 

Important Note: Use the given session to initialize the repository. Do not create other repository sessions when initializing the repository to avoid dead locks.

Most used methods

  • install
  • uninstall
  • doInitializeRepository
  • getInstance
  • initializeRepository
    Must be implemented by custom initializers.

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • findViewById (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • JComboBox (javax.swing)
  • JFileChooser (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now