/** * Gets the application context. * * @return the application context */ public ApplicationContext getApplicationContext() { if (this.sourceApplicationContextFactory == null) { start(); } return this.sourceApplicationContextFactory.getApplicationContext(); }
/** * Gets the application context. * * @return the application context */ public ApplicationContext getApplicationContext() { if (this.sourceApplicationContextFactory == null) { start(); } return this.sourceApplicationContextFactory.getApplicationContext(); }
public EmailUtil(ApplicationContext applicationContext) { ApplicationContextFactory subsystem = (ApplicationContextFactory) applicationContext.getBean("OutboundSMTP"); ConfigurableApplicationContext childContext = (ConfigurableApplicationContext) subsystem.getApplicationContext(); this.mailActionExecutor = childContext.getBean("mail", ExtendedMailActionExecutor.class); }
if (sourceApplicationContextFactory != null) ApplicationContext newContext = sourceApplicationContextFactory.getApplicationContext(); if (this.context != newContext) haveWriteLock = true; newContext = sourceApplicationContextFactory.getApplicationContext(); this.context = newContext; this.typedBeans.clear();
if (sourceApplicationContextFactory != null) ApplicationContext newContext = sourceApplicationContextFactory.getApplicationContext(); if (this.context != newContext) haveWriteLock = true; newContext = sourceApplicationContextFactory.getApplicationContext(); this.context = newContext; this.typedBeans.clear();
ACTION_EXECUTER = appCtx.getBean("OutboundSMTP", ApplicationContextFactory.class).getApplicationContext().getBean("mail", MailActionExecuter.class); PREFERENCE_SERVICE = appCtx.getBean("PreferenceService", PreferenceService.class); PERSON_SERVICE = appCtx.getBean("PersonService", PersonService.class);
repositoryHelper = (Repository)this.applicationContext.getBean("repositoryHelper"); ApplicationContextFactory fileServers = (ApplicationContextFactory) this.applicationContext.getBean("fileServers"); cifsHelper = (CifsHelper) fileServers.getApplicationContext().getBean("cifsHelper"); driver = (ExtendedDiskInterface)this.applicationContext.getBean("contentDiskDriver"); mlAwareNodeService = (NodeService) this.applicationContext.getBean("mlAwareNodeService");
.getBean("OutboundSMTP")).getApplicationContext().getBean("mail"); mailService.setTestMode(true); mailService.clearLastTestMessage();
.getBean("OutboundSMTP")).getApplicationContext().getBean("mail"); mailService.setTestMode(true); mailService.clearLastTestMessage();
@BeforeClass public static void setupTest() throws Exception { SERVICE_REGISTRY = (ServiceRegistry)APP_CONTEXT_INIT.getApplicationContext().getBean(ServiceRegistry.SERVICE_REGISTRY); NODE_SERVICE = SERVICE_REGISTRY.getNodeService(); TRANSACTION_HELPER = SERVICE_REGISTRY.getTransactionService().getRetryingTransactionHelper(); ACTION_SERVICE = SERVICE_REGISTRY.getActionService(); RULE_SERVICE = SERVICE_REGISTRY.getRuleService(); CONTENT_SERVICE = SERVICE_REGISTRY.getContentService(); MAIL_ACTION_EXECUTER = APP_CONTEXT_INIT.getApplicationContext().getBean("OutboundSMTP", ApplicationContextFactory.class).getApplicationContext().getBean("mail", MailActionExecuter.class); WAS_IN_TEST_MODE = MAIL_ACTION_EXECUTER.isTestMode(); MAIL_ACTION_EXECUTER.setTestMode(true); Repository repositoryHelper = (Repository) APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper"); COMPANY_HOME = repositoryHelper.getCompanyHome(); // Create some static test content TEST_FOLDER = STATIC_TEST_NODES.createNode(COMPANY_HOME, "testFolder", ContentModel.TYPE_FOLDER, AuthenticationUtil.getAdminUserName()); }
.getBean("OutboundSMTP")).getApplicationContext().getBean("mail"); mailService.setTestMode(true);
"testsubsystem"); ConfigurableApplicationContext childContext = (ConfigurableApplicationContext) subsystem .getApplicationContext(); assertTrue("Subsystem not started", childContext.isActive()); TestService testService = (TestService) childContext.getBean("testService");