List of usage examples for org.springframework.context ApplicationContext equals
public boolean equals(Object obj)
From source file:org.alfresco.filesys.AbstractServerConfigurationBean.java
public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { ContextRefreshedEvent refreshEvent = (ContextRefreshedEvent) event; ApplicationContext refreshContext = refreshEvent.getApplicationContext(); if (refreshContext != null && refreshContext.equals(applicationContext)) { // Initialize the bean init();/* ww w . j a va2 s . co m*/ } } }
From source file:org.alfresco.repo.web.scripts.RepositoryContainer.java
@Override public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { ContextRefreshedEvent refreshEvent = (ContextRefreshedEvent) event; ApplicationContext refreshContext = refreshEvent.getApplicationContext(); if (refreshContext != null && refreshContext.equals(applicationContext)) { RunAsWork<Object> work = new RunAsWork<Object>() { public Object doWork() throws Exception { reset();//from ww w . j a v a 2 s . c o m return null; } }; AuthenticationUtil.runAs(work, AuthenticationUtil.getSystemUserName()); } } }
From source file:org.springframework.extensions.surf.util.AbstractLifecycleBean.java
public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { ContextRefreshedEvent refreshEvent = (ContextRefreshedEvent) event; ApplicationContext refreshContext = refreshEvent.getApplicationContext(); if (refreshContext != null && refreshContext.equals(applicationContext)) { if (log.isDebugEnabled()) log.debug("Bootstrapping component " + this.getClass().getName()); onBootstrap(refreshEvent);//from www .ja v a 2s . com } } else if (event instanceof ContextClosedEvent) { ContextClosedEvent closedEvent = (ContextClosedEvent) event; ApplicationContext closedContext = closedEvent.getApplicationContext(); if (closedContext != null && closedContext.equals(applicationContext)) { if (log.isDebugEnabled()) log.debug("Shutting down component " + this.getClass().getName()); onShutdown(closedEvent); } } }
From source file:org.springframework.extensions.webscripts.AbstractRuntimeContainer.java
public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { ContextRefreshedEvent refreshEvent = (ContextRefreshedEvent) event; ApplicationContext refreshContext = refreshEvent.getApplicationContext(); if (refreshContext != null && refreshContext.equals(applicationContext)) { reset();//w w w . j av a 2 s . c o m } } }
From source file:org.springframework.extensions.webscripts.processor.AbstractTemplateProcessor.java
public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { ContextRefreshedEvent refreshEvent = (ContextRefreshedEvent) event; ApplicationContext refreshContext = refreshEvent.getApplicationContext(); if (refreshContext != null && refreshContext.equals(applicationContext)) { // call init method init();//w w w. j a va 2 s . c om // register with root processor register(); } } }