org.kuali.rice.core.config
Class ModuleConfigurer

java.lang.Object
  extended by org.kuali.rice.core.lifecycle.BaseLifecycle
      extended by org.kuali.rice.core.lifecycle.BaseCompositeLifecycle
          extended by org.kuali.rice.core.config.ModuleConfigurer
All Implemented Interfaces:
Configurer, RiceConfigEventListener, Lifecycle, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
KCBConfigurer, KENConfigurer, KEWConfigurer, KIMConfigurer, KIMThinClientConfigurer, KNSConfigurer, KSBConfigurer, KSBThinClientConfigurer

public abstract class ModuleConfigurer
extends BaseCompositeLifecycle
implements Configurer, org.springframework.beans.factory.InitializingBean, RiceConfigEventListener


Field Summary
static String EMBEDDED_RUN_MODE
           
protected  boolean exposeServicesOnBus
           
protected  boolean includeUserInterfaceComponents
           
static String LOCAL_RUN_MODE
           
protected  org.apache.log4j.Logger LOG
          Protected logger for use by subclasses
private  String moduleName
           
static String REMOTE_RUN_MODE
           
protected  String resourceLoaderName
           
private  String runMode
           
protected  boolean setSOAPServicesAsDefault
           
protected  String springFileLocations
           
protected  boolean testMode
           
static String THIN_RUN_MODE
           
protected  List<String> VALID_RUN_MODES
           
protected  boolean webInterface
           
protected  String webModuleBaseUrl
           
protected  String webModuleConfigName
           
protected  String webModuleConfigurationFiles
           
 
Constructor Summary
ModuleConfigurer()
           
 
Method Summary
 void afterPropertiesSet()
           
protected  void configureRunMode(Config config)
          Creates a configuration parameter for the run mode by appending the module name (in lower case) plus ".mode"
protected  void configureWebConfiguration(Config config)
           
protected  ResourceLoader createResourceLoader()
          Constructs a SpringResourceLoader from the appropriate Spring context resource and with the configured resource loader name (and current context config service namespace)
protected  String getDefaultConfigPackagePath()
           
 String getDefaultResourceLoaderName()
           
 QName getDefaultResourceLoaderQName()
           
protected  String getDefaultSpringBeansPath(String configPackagePath)
           
 String getModuleName()
           
 ResourceLoader getResourceLoaderToRegister()
          This method returns a resource loader that this module might want to register with the global resource loader.
 String getRunMode()
           
 String getSpringFileLocations()
          This method returns a comma separated string of spring file locations for this module.
 String getWebModuleBaseUrl()
           
 String getWebModuleConfigName()
           
 String getWebModuleConfigurationFiles()
           
 boolean hasWebInterface()
           
 boolean isExposeServicesOnBus()
           
 boolean isIncludeUserInterfaceComponents()
           
 boolean isSetSOAPServicesAsDefault()
           
 boolean isTestMode()
           
 Config loadConfig(Config parentConfig)
           
protected  List<Lifecycle> loadLifecycles()
          This overridden method ...
 void onEvent(RiceConfigEvent event)
           
 void setExposeServicesOnBus(boolean exposeServicesOnBus)
           
protected  void setHasWebInterface(boolean webInterface)
           
 void setIncludeUserInterfaceComponents(boolean includeUserInterfaceComponents)
           
 void setModuleName(String moduleName)
           
 void setRunMode(String runMode)
           
 void setSetSOAPServicesAsDefault(boolean setSOAPServicesAsDefault)
           
 void setSpringFileLocations(String springFileLocations)
           
 void setTestMode(boolean testMode)
           
 void setWebModuleBaseUrl(String webModuleBaseUrl)
           
 void setWebModuleConfigName(String webModuleConfigName)
           
 void setWebModuleConfigurationFiles(String webModuleConfigurationFiles)
           
 boolean shouldRenderWebInterface()
          This base implementation returns true when the module has a web interface and the runMode is "local".
 
Methods inherited from class org.kuali.rice.core.lifecycle.BaseCompositeLifecycle
start, stop
 
Methods inherited from class org.kuali.rice.core.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.lifecycle.Lifecycle
isStarted, start, stop
 

Field Detail

LOG

protected final org.apache.log4j.Logger LOG
Protected logger for use by subclasses


LOCAL_RUN_MODE

public static final String LOCAL_RUN_MODE
See Also:
Constant Field Values

EMBEDDED_RUN_MODE

public static final String EMBEDDED_RUN_MODE
See Also:
Constant Field Values

REMOTE_RUN_MODE

public static final String REMOTE_RUN_MODE
See Also:
Constant Field Values

THIN_RUN_MODE

public static final String THIN_RUN_MODE
See Also:
Constant Field Values

VALID_RUN_MODES

protected final List<String> VALID_RUN_MODES

runMode

private String runMode

moduleName

private String moduleName

webModuleConfigName

protected String webModuleConfigName

webModuleConfigurationFiles

protected String webModuleConfigurationFiles

webModuleBaseUrl

protected String webModuleBaseUrl

webInterface

protected boolean webInterface

testMode

protected boolean testMode

springFileLocations

protected String springFileLocations

resourceLoaderName

protected String resourceLoaderName

exposeServicesOnBus

protected boolean exposeServicesOnBus

setSOAPServicesAsDefault

protected boolean setSOAPServicesAsDefault

includeUserInterfaceComponents

protected boolean includeUserInterfaceComponents
Constructor Detail

ModuleConfigurer

public ModuleConfigurer()
Method Detail

loadLifecycles

protected List<Lifecycle> loadLifecycles()
                                  throws Exception
This overridden method ...

Specified by:
loadLifecycles in class BaseCompositeLifecycle
Throws:
Exception
See Also:
BaseCompositeLifecycle.loadLifecycles()

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception
See Also:
InitializingBean.afterPropertiesSet()

getRunMode

public String getRunMode()

setRunMode

public void setRunMode(String runMode)

loadConfig

public Config loadConfig(Config parentConfig)
                  throws Exception
Throws:
Exception

configureWebConfiguration

protected void configureWebConfiguration(Config config)
                                  throws Exception
Throws:
Exception

configureRunMode

protected void configureRunMode(Config config)
Creates a configuration parameter for the run mode by appending the module name (in lower case) plus ".mode"


getSpringFileLocations

public String getSpringFileLocations()
                              throws Exception
This method returns a comma separated string of spring file locations for this module.

Throws:
Exception

getDefaultConfigPackagePath

protected String getDefaultConfigPackagePath()

getDefaultSpringBeansPath

protected String getDefaultSpringBeansPath(String configPackagePath)

getDefaultResourceLoaderName

public String getDefaultResourceLoaderName()

getDefaultResourceLoaderQName

public QName getDefaultResourceLoaderQName()

getResourceLoaderToRegister

public ResourceLoader getResourceLoaderToRegister()
                                           throws Exception
This method returns a resource loader that this module might want to register with the global resource loader.

Throws:
Exception

createResourceLoader

protected ResourceLoader createResourceLoader()
                                       throws Exception
Constructs a SpringResourceLoader from the appropriate Spring context resource and with the configured resource loader name (and current context config service namespace)

Throws:
Exception

onEvent

public void onEvent(RiceConfigEvent event)
             throws Exception
Specified by:
onEvent in interface RiceConfigEventListener
Throws:
Exception

getModuleName

public String getModuleName()

setModuleName

public void setModuleName(String moduleName)

getWebModuleConfigName

public String getWebModuleConfigName()

setWebModuleConfigName

public void setWebModuleConfigName(String webModuleConfigName)

getWebModuleConfigurationFiles

public String getWebModuleConfigurationFiles()

setWebModuleConfigurationFiles

public void setWebModuleConfigurationFiles(String webModuleConfigurationFiles)

hasWebInterface

public boolean hasWebInterface()

setHasWebInterface

protected void setHasWebInterface(boolean webInterface)

shouldRenderWebInterface

public boolean shouldRenderWebInterface()
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.


isTestMode

public boolean isTestMode()
Returns:
the testMode

setTestMode

public void setTestMode(boolean testMode)
Parameters:
testMode - the testMode to set

setSpringFileLocations

public void setSpringFileLocations(String springFileLocations)
Parameters:
springFileLocations - the springFileLocations to set

getWebModuleBaseUrl

public String getWebModuleBaseUrl()
Returns:
the webModuleBaseUrl

setWebModuleBaseUrl

public void setWebModuleBaseUrl(String webModuleBaseUrl)
Parameters:
webModuleBaseUrl - the webModuleBaseUrl to set

isExposeServicesOnBus

public boolean isExposeServicesOnBus()

setExposeServicesOnBus

public void setExposeServicesOnBus(boolean exposeServicesOnBus)

isIncludeUserInterfaceComponents

public boolean isIncludeUserInterfaceComponents()

setIncludeUserInterfaceComponents

public void setIncludeUserInterfaceComponents(boolean includeUserInterfaceComponents)

isSetSOAPServicesAsDefault

public boolean isSetSOAPServicesAsDefault()

setSetSOAPServicesAsDefault

public void setSetSOAPServicesAsDefault(boolean setSOAPServicesAsDefault)


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.