org.kuali.rice.ksb.messaging.config
Class KSBConfigurer

java.lang.Object
  extended by org.kuali.rice.core.api.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.api.lifecycle.BaseCompositeLifecycle
          extended by org.kuali.rice.core.framework.config.module.ModuleConfigurer
              extended by org.kuali.rice.ksb.messaging.config.KSBConfigurer
All Implemented Interfaces:
EventListener, Configurer, Lifecycle, org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, org.springframework.context.event.SmartApplicationListener, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware

public class KSBConfigurer
extends ModuleConfigurer
implements org.springframework.context.event.SmartApplicationListener

Used to configure the embedded workflow. This could be used to configure embedded workflow programmatically but mostly this is a base class by which to hang specific configuration behavior off of through subclassing

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
 
Fields inherited from class org.kuali.rice.core.framework.config.module.ModuleConfigurer
LOG
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
KSBConfigurer()
           
 
Method Summary
 void addAdditonalToConfig()
           
protected  void cleanUpConfiguration()
          Because our configuration is global, shutting down Rice does not get rid of objects stored there.
protected  void configureAlternateEndpoints()
           
protected  void configureDataSource()
           
protected  void configurePlatformTransactionManager()
           
protected  void configureScheduler()
           
protected  void doAdditionalContextStartedLogic()
           
protected  void doAdditionalContextStoppedLogic()
           
protected  void doAdditionalModuleStartLogic()
           
protected  void doAdditionalModuleStopLogic()
           
 List<AlternateEndpointLocation> getAlternateEndpointLocations()
           
 List<AlternateEndpoint> getAlternateEndpoints()
           
 DataSource getBamDataSource()
           
 org.quartz.Scheduler getExceptionMessagingScheduler()
           
 DataSource getMessageDataSource()
           
 DataSource getNonTransactionalMessageDataSource()
           
 int getOrder()
           
 org.springframework.transaction.PlatformTransactionManager getPlatformTransactionManager()
           
 List<String> getPrimarySpringFiles()
           
 DataSource getRegistryDataSource()
           
 Collection<ResourceLoader> getResourceLoadersToRegister()
           
 List<ServiceDefinition> getServices()
           
 boolean hasWebInterface()
          Indicates whether or not this module has a web interface module.
protected  boolean isBamEnabled()
           
protected  boolean isMessagePersistenceEnabled()
           
 List<Lifecycle> loadLifecycles()
           
protected  WebModuleConfiguration loadWebModule()
          Subclasses can override the default implementation of this method if they want to provide a custom implementation for loading the web module configuration.
 void onApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent)
           
 void setAlternateEndpointLocations(List<AlternateEndpointLocation> alternateEndpointLocations)
           
 void setAlternateEndpoints(List<AlternateEndpoint> alternateEndpoints)
           
 void setBamDataSource(DataSource bamDataSource)
           
 void setExceptionMessagingScheduler(org.quartz.Scheduler exceptionMessagingScheduler)
           
 void setMessageDataSource(DataSource messageDataSource)
           
 void setNonTransactionalMessageDataSource(DataSource nonTransactionalMessageDataSource)
           
 void setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager springTransactionManager)
           
 void setRegistryDataSource(DataSource registryDataSource)
           
 void setServices(List<ServiceDefinition> javaServices)
           
 boolean shouldRenderWebInterface()
          This base implementation returns true when the module has a web interface and the runMode is "local".
 boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> aClass)
           
 boolean supportsSourceType(Class<?> aClass)
           
protected  void validateServices(List<ServiceDefinition> services)
           
 
Methods inherited from class org.kuali.rice.core.framework.config.module.ModuleConfigurer
addToConfig, afterPropertiesSet, destroy, doAdditonalConfigurerValidations, getAdditionalSpringFiles, getCurrentContextConfigurers, getDefaultConfigPackagePath, getDefaultSpringBeansPath, getModuleName, getProperties, getRunMode, getValidRunModes, getWebModuleConfiguration, initializeResourceLoaders, isExposeServicesOnBus, setModuleName, setProperties, setServletContext, setValidRunModes, start, stop, validateConfigurerState
 
Methods inherited from class org.kuali.rice.core.api.lifecycle.BaseLifecycle
isStarted, setStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.lifecycle.Lifecycle
isStarted
 

Constructor Detail

KSBConfigurer

public KSBConfigurer()
Method Detail

addAdditonalToConfig

public void addAdditonalToConfig()
Overrides:
addAdditonalToConfig in class ModuleConfigurer

getPrimarySpringFiles

public List<String> getPrimarySpringFiles()
Specified by:
getPrimarySpringFiles in interface Configurer
Overrides:
getPrimarySpringFiles in class ModuleConfigurer

hasWebInterface

public boolean hasWebInterface()
Description copied from class: ModuleConfigurer
Indicates whether or not this module has a web interface module. Default implementation returns false, but subclasses can override to return true if they have a web module that can be loaded.

Overrides:
hasWebInterface in class ModuleConfigurer
Returns:
true if this module has a web interface, false otherwise

shouldRenderWebInterface

public boolean shouldRenderWebInterface()
Description copied from class: ModuleConfigurer
This base implementation returns true when the module has a web interface and the runMode is "local".

Subclasses can override this method if there are different requirements for inclusion of the web UI for the module.

Overrides:
shouldRenderWebInterface in class ModuleConfigurer
Returns:
true if the web interface for this module should be rendered, false otherwise

loadWebModule

protected WebModuleConfiguration loadWebModule()
Description copied from class: ModuleConfigurer
Subclasses can override the default implementation of this method if they want to provide a custom implementation for loading the web module configuration. This method will be called from #getWebModuleConfiguration when #hasWebInterface return true.

Overrides:
loadWebModule in class ModuleConfigurer
Returns:
the loaded web module configuration, this method should *never* return null.

getResourceLoadersToRegister

public Collection<ResourceLoader> getResourceLoadersToRegister()
                                                        throws Exception
Overrides:
getResourceLoadersToRegister in class ModuleConfigurer
Throws:
Exception

loadLifecycles

public List<Lifecycle> loadLifecycles()
                               throws Exception
Specified by:
loadLifecycles in interface Configurer
Overrides:
loadLifecycles in class ModuleConfigurer
Throws:
Exception

validateServices

protected void validateServices(List<ServiceDefinition> services)

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent applicationEvent)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>

doAdditionalContextStartedLogic

protected void doAdditionalContextStartedLogic()

doAdditionalContextStoppedLogic

protected void doAdditionalContextStoppedLogic()

supportsEventType

public boolean supportsEventType(Class<? extends org.springframework.context.ApplicationEvent> aClass)
Specified by:
supportsEventType in interface org.springframework.context.event.SmartApplicationListener

supportsSourceType

public boolean supportsSourceType(Class<?> aClass)
Specified by:
supportsSourceType in interface org.springframework.context.event.SmartApplicationListener

getOrder

public int getOrder()
Specified by:
getOrder in interface org.springframework.core.Ordered

doAdditionalModuleStartLogic

protected void doAdditionalModuleStartLogic()
                                     throws Exception
Overrides:
doAdditionalModuleStartLogic in class ModuleConfigurer
Throws:
Exception

doAdditionalModuleStopLogic

protected void doAdditionalModuleStopLogic()
                                    throws Exception
Overrides:
doAdditionalModuleStopLogic in class ModuleConfigurer
Throws:
Exception

isMessagePersistenceEnabled

protected boolean isMessagePersistenceEnabled()

isBamEnabled

protected boolean isBamEnabled()

configureScheduler

protected void configureScheduler()

configureDataSource

protected void configureDataSource()

configurePlatformTransactionManager

protected void configurePlatformTransactionManager()

configureAlternateEndpoints

protected void configureAlternateEndpoints()

cleanUpConfiguration

protected void cleanUpConfiguration()
Because our configuration is global, shutting down Rice does not get rid of objects stored there. For that reason we need to manually clean these up. This is most important in the case of the service bus because the configuration is used to store services to be exported. If we don't clean this up then a shutdown/startup within the same class loading context causes the service list to be doubled and results in "multiple endpoint" error messages.


getServices

public List<ServiceDefinition> getServices()

setServices

public void setServices(List<ServiceDefinition> javaServices)

getMessageDataSource

public DataSource getMessageDataSource()

setMessageDataSource

public void setMessageDataSource(DataSource messageDataSource)

getNonTransactionalMessageDataSource

public DataSource getNonTransactionalMessageDataSource()

setNonTransactionalMessageDataSource

public void setNonTransactionalMessageDataSource(DataSource nonTransactionalMessageDataSource)

getRegistryDataSource

public DataSource getRegistryDataSource()

setRegistryDataSource

public void setRegistryDataSource(DataSource registryDataSource)

getBamDataSource

public DataSource getBamDataSource()

setBamDataSource

public void setBamDataSource(DataSource bamDataSource)

getExceptionMessagingScheduler

public org.quartz.Scheduler getExceptionMessagingScheduler()

setExceptionMessagingScheduler

public void setExceptionMessagingScheduler(org.quartz.Scheduler exceptionMessagingScheduler)

getPlatformTransactionManager

public org.springframework.transaction.PlatformTransactionManager getPlatformTransactionManager()

setPlatformTransactionManager

public void setPlatformTransactionManager(org.springframework.transaction.PlatformTransactionManager springTransactionManager)

getAlternateEndpointLocations

public List<AlternateEndpointLocation> getAlternateEndpointLocations()

setAlternateEndpointLocations

public void setAlternateEndpointLocations(List<AlternateEndpointLocation> alternateEndpointLocations)

getAlternateEndpoints

public List<AlternateEndpoint> getAlternateEndpoints()

setAlternateEndpoints

public void setAlternateEndpoints(List<AlternateEndpoint> alternateEndpoints)


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.