Search in sources :

Example 86 with ClassPathXmlApplicationContext

use of org.springframework.context.support.ClassPathXmlApplicationContext in project ORCID-Source by ORCID.

the class MigrateFundingAmountToANumericValue method init.

@SuppressWarnings("resource")
private void init() {
    ApplicationContext context = new ClassPathXmlApplicationContext("orcid-core-context.xml");
    profileFundingDao = (ProfileFundingDao) context.getBean("profileFundingDao");
    transactionTemplate = (TransactionTemplate) context.getBean("transactionTemplate");
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext)

Example 87 with ClassPathXmlApplicationContext

use of org.springframework.context.support.ClassPathXmlApplicationContext in project ORCID-Source by ORCID.

the class IndexProfiles method init.

@SuppressWarnings("resource")
private void init() {
    ApplicationContext context = new ClassPathXmlApplicationContext("orcid-core-context.xml");
    orcidProfileManager = (OrcidProfileManager) context.getBean("orcidProfileManager");
    orcidIndexManager = (OrcidIndexManager) context.getBean("orcidIndexManager");
    profileDao = (ProfileDao) context.getBean("profileDao");
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext)

Example 88 with ClassPathXmlApplicationContext

use of org.springframework.context.support.ClassPathXmlApplicationContext in project ORCID-Source by ORCID.

the class GetSalesForceAccessToken method main.

@SuppressWarnings("resource")
public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("orcid-core-context.xml");
    SalesForceDao salesForceDao = (SalesForceDao) context.getBean("salesForceDao");
    String accessToken = salesForceDao.getAccessToken();
    System.out.println(accessToken);
    System.exit(0);
}
Also used : ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ApplicationContext(org.springframework.context.ApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) SalesForceDao(org.orcid.core.salesforce.dao.SalesForceDao)

Example 89 with ClassPathXmlApplicationContext

use of org.springframework.context.support.ClassPathXmlApplicationContext in project ORCID-Source by ORCID.

the class GetConsortiumFromSalesForceById method main.

@SuppressWarnings("resource")
public static void main(String[] args) {
    ApplicationContext context = new ClassPathXmlApplicationContext("orcid-core-context.xml");
    SalesForceManager salesForceManager = (SalesForceManager) context.getBean("salesForceManager");
    Consortium consortium = salesForceManager.retrieveConsortium(args[0]);
    System.out.println(consortium);
    System.exit(0);
}
Also used : ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ApplicationContext(org.springframework.context.ApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) Consortium(org.orcid.core.salesforce.model.Consortium) SalesForceManager(org.orcid.core.manager.SalesForceManager)

Example 90 with ClassPathXmlApplicationContext

use of org.springframework.context.support.ClassPathXmlApplicationContext in project ORCID-Source by ORCID.

the class SendBadOrgsEmail method init.

@SuppressWarnings("resource")
private void init() {
    ApplicationContext context = new ClassPathXmlApplicationContext("orcid-core-context.xml");
    transactionTemplate = (TransactionTemplate) context.getBean("transactionTemplate");
    profileDao = (ProfileDao) context.getBean("profileDao");
    affiliationsManager = (AffiliationsManager) context.getBean("affiliationsManager");
    profileFundingManager = (ProfileFundingManager) context.getBean("profileFundingManager");
    localeManager = (LocaleManager) context.getBean("localeManager");
    templateManager = (TemplateManager) context.getBean("templateManager");
    messageSource = (MessageSource) context.getBean("messageSource");
    orcidUrlManager = (OrcidUrlManager) context.getBean("orcidUrlManager");
    mailGunManager = (MailGunManager) context.getBean("mailGunManager");
    notificationManager = (NotificationManager) context.getBean("notificationManager");
}
Also used : ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ApplicationContext(org.springframework.context.ApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext)

Aggregations

ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)561 Test (org.junit.Test)265 ApplicationContext (org.springframework.context.ApplicationContext)167 Before (org.junit.Before)53 ConfigurableMessenger (org.springframework.scripting.ConfigurableMessenger)33 ITestBean (org.springframework.tests.sample.beans.ITestBean)30 Messenger (org.springframework.scripting.Messenger)29 CamelContext (org.apache.camel.CamelContext)25 Refreshable (org.springframework.aop.target.dynamic.Refreshable)23 AbstractXmlApplicationContext (org.springframework.context.support.AbstractXmlApplicationContext)22 DataSource (javax.sql.DataSource)18 SpringCamelContext (org.apache.camel.spring.SpringCamelContext)16 AbstractApplicationContext (org.springframework.context.support.AbstractApplicationContext)16 Bus (org.apache.cxf.Bus)14 ConfigurableApplicationContext (org.springframework.context.ConfigurableApplicationContext)14 ArrayList (java.util.ArrayList)13 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)12 DemoService (com.alibaba.dubbo.config.spring.api.DemoService)11 IOException (java.io.IOException)10 ProducerTemplate (org.apache.camel.ProducerTemplate)10