congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IntactContext.getSpringContext
Code IndexAdd Tabnine to your IDE (free)

How to use
getSpringContext
method
in
uk.ac.ebi.intact.core.context.IntactContext

Best Java code snippets using uk.ac.ebi.intact.core.context.IntactContext.getSpringContext (Showing top 20 results out of 315)

origin: uk.ac.ebi.intact.core/intact-core-readonly

private ConfigurationHandler getConfigurationHandler() {
  return (ConfigurationHandler) getSpringContext().getBean("configurationHandler");
}
origin: uk.ac.ebi.intact.core/intact-core

private ConfigurationHandler getConfigurationHandler() {
  return (ConfigurationHandler) getSpringContext().getBean("configurationHandler");
}
origin: uk.ac.ebi.intact.dataexchange/intact-cvutils

public static CvUpdater createInstance(IntactContext intactContext) {
  return (CvUpdater) intactContext.getSpringContext().getBean("cvUpdater");
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * @since 2.4.0
 */
public CoreDeleter getCoreDeleter() {
  return (CoreDeleter) IntactContext.getCurrentInstance().getSpringContext().getBean("coreDeleter");
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

  public void destroy() throws Exception {
    getSpringContext().close();

    if (log.isDebugEnabled()) log.debug("Releasing LogFactory");
    LogFactory.release(Thread.currentThread().getContextClassLoader());

    if (log.isInfoEnabled()) log.debug("Destroying IntactContext");
    instance = null;
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * @since 2.4.0
 */
public CoreDeleter getCoreDeleter() {
  return (CoreDeleter) IntactContext.getCurrentInstance().getSpringContext().getBean("coreDeleter");
}
origin: uk.ac.ebi.intact.core/intact-core

  public void destroy() throws Exception {
    getSpringContext().close();

    if (log.isDebugEnabled()) log.debug("Releasing LogFactory");
    LogFactory.release(Thread.currentThread().getContextClassLoader());

    if (log.isInfoEnabled()) log.debug("Destroying IntactContext");
    instance = null;
  }
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public static String nextUnassignedId(IntactContext intactContext) {
  SequenceManager sequenceManager = (SequenceManager) intactContext.getSpringContext().getBean("sequenceManager");
  return "unassigned" + sequenceManager.getNextValueForSequence("unassigned_seq");
}
origin: uk.ac.ebi.intact.core/intact-core

public static String nextUnassignedId(IntactContext intactContext) {
  SequenceManager sequenceManager = (SequenceManager) intactContext.getSpringContext().getBean("sequenceManager");
  return "unassigned" + sequenceManager.getNextValueForSequence("unassigned_seq");
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-exchange

public static PsiEnricher createPsiEnricher(IntactContext intactContext) {
  return createPsiEnricher(intactContext.getSpringContext());
}
origin: uk.ac.ebi.intact.core/intact-core

public CorePersister getCorePersister() {
  return (CorePersister) IntactContext.getCurrentInstance().getSpringContext().getBean("corePersister");
}
origin: uk.ac.ebi.intact.dataexchange.psimi/intact-psixml-exchange

public static PsiExchange createPsiExchange(IntactContext intactContext) {
  return createPsiExchange(intactContext.getSpringContext());
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public CorePersister getCorePersister() {
  return (CorePersister) IntactContext.getCurrentInstance().getSpringContext().getBean("corePersister");
}
origin: uk.ac.ebi.intact.core/intact-core

public CorePersisterImpl() {
  this(IntactContext.getCurrentInstance(), (Finder)
      IntactContext.getCurrentInstance().getSpringContext().getBean("finder"));
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

public CorePersisterImpl() {
  this(IntactContext.getCurrentInstance(), (Finder)
      IntactContext.getCurrentInstance().getSpringContext().getBean("finder"));
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * Creates a schema
 * @param initializeDatabase If false, do not initialize the database (e.g. don't create Institution)
 */
public static void createSchema(boolean initializeDatabase) {
  if (log.isDebugEnabled()) log.debug("Creating schema");
  SchemaExport se = newSchemaExport();
  se.create(false, true);
  if (initializeDatabase) {
    if (log.isDebugEnabled()) log.debug("Initializing database");
    IntactInitializer initializer = (IntactInitializer) IntactContext.getCurrentInstance()
        .getSpringContext().getBean("intactInitializer");
    try {
      initializer.init();
    } catch (Exception e) {
      throw new IntactException("Problem re-initializing core", e);
    }
  } 
}
origin: uk.ac.ebi.intact.core/intact-core

protected static SchemaExport newSchemaExport() {
  LocalEntityManagerFactoryBean factoryBean = (LocalEntityManagerFactoryBean) IntactContext.getCurrentInstance().getSpringContext()
      .getBean("&entityFactoryManager");
  PersistenceUnitInfo persistenceUnitInfo = factoryBean.getPersistenceUnitInfo();
  Configuration config = new Ejb3Configuration().configure(persistenceUnitInfo, null).getHibernateConfiguration();
  
  SchemaExport se =  new SchemaExport(config);
  return se;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

protected static SchemaExport newSchemaExport() {
  LocalEntityManagerFactoryBean factoryBean = (LocalEntityManagerFactoryBean) IntactContext.getCurrentInstance().getSpringContext()
      .getBean("&entityFactoryManager");
  PersistenceUnitInfo persistenceUnitInfo = factoryBean.getPersistenceUnitInfo();
  Configuration config = new Ejb3Configuration().configure(persistenceUnitInfo, null).getHibernateConfiguration();
  
  SchemaExport se =  new SchemaExport(config);
  return se;
}
origin: uk.ac.ebi.intact.core/intact-core-readonly

/**
 * The local identity is created using a sequence. If the sequence does not exist, a new one is created
 * with initial value calculated using the maximum integer for the existing local CV identifiers.
 * @return The next value available
 * @throws SequenceCreationException thrown if the sequence cannot be created.
 */
protected String nextLocalIdentifier() throws SequenceCreationException {
  final IntactContext context = IntactContext.getCurrentInstance();
  String prefix = context.getConfig().getLocalCvPrefix();
  Integer max = context.getDataContext().getDaoFactory()
      .getCvObjectDao().getLastCvIdentifierWithPrefix(prefix);
  if (max == null) max = 0;
  SequenceManager seqManager = (SequenceManager) context.getSpringContext().getBean("sequenceManager");
  seqManager.createSequenceIfNotExists(IntactAuxiliaryConfigurator.CV_LOCAL_SEQ, max+1);
  String nextIntegerAsString = String.valueOf(seqManager.getNextValueForSequence(IntactAuxiliaryConfigurator.CV_LOCAL_SEQ));
  return prefix+":" + StringUtils.leftPad(nextIntegerAsString, 4, "0");
}
origin: uk.ac.ebi.intact.core/intact-core

/**
 * The local identity is created using a sequence. If the sequence does not exist, a new one is created
 * with initial value calculated using the maximum integer for the existing local CV identifiers.
 * @return The next value available
 * @throws SequenceCreationException thrown if the sequence cannot be created.
 */
protected String nextLocalIdentifier() throws SequenceCreationException {
  final IntactContext context = IntactContext.getCurrentInstance();
  String prefix = context.getConfig().getLocalCvPrefix();
  Integer max = context.getDataContext().getDaoFactory()
      .getCvObjectDao().getLastCvIdentifierWithPrefix(prefix);
  if (max == null) max = 0;
  SequenceManager seqManager = (SequenceManager) context.getSpringContext().getBean("sequenceManager");
  seqManager.createSequenceIfNotExists(IntactAuxiliaryConfigurator.CV_LOCAL_SEQ, max+1);
  String nextIntegerAsString = String.valueOf(seqManager.getNextValueForSequence(IntactAuxiliaryConfigurator.CV_LOCAL_SEQ));
  return prefix+":" + StringUtils.leftPad(nextIntegerAsString, 4, "0");
}
uk.ac.ebi.intact.core.contextIntactContextgetSpringContext

Popular methods of IntactContext

  • getCurrentInstance
    Gets the current (ThreadLocal) instance of IntactContext. If no such instance exist, IntAct Core wil
  • getDataContext
  • getInstitution
    Gets the institution from the RuntimeConfig object. In addition, tries to refresh the instance from
  • getDaoFactory
  • getCorePersister
  • currentInstanceExists
    Checks if an instance already exists.
  • getLifecycleManager
    Gets the lifecycle manager for publications.
  • getPersisterHelper
  • initContext
    Initializes a standalone context.
  • bindToApplication
  • getApplication
  • getConfig
  • getApplication,
  • getConfig,
  • getConfigurationHandler,
  • getCoreDeleter,
  • getUserContext,
  • initStandaloneContextInMemory,
  • setApplication

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Collectors (java.util.stream)
  • Top plugins for WebStorm
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