org.kuali.rice.krad.bo
Class ModuleConfiguration

java.lang.Object
  extended by org.kuali.rice.krad.bo.ModuleConfiguration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class ModuleConfiguration
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

This class contains various configuration properties for a Rice module.

The Rice framework is composed of several separate modules, each of which is responsible for providing a set of functionality. These include:


Client Applications will also have their own module configurations. A client application could create a single module or multiple modules, depending on how it is organized.
This ModuleConfiguration object is created during Spring initialization. The properties of this ModuleConfiguration are specified in the module's SpringBean definition XML configuration file.

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

Field Summary
protected  org.springframework.context.ApplicationContext applicationContext
           
protected  List<String> databaseRepositoryFilePaths
          a list of entity description files to be loaded during initialization of the persistence service.
protected  List<String> dataDictionaryPackages
          the list of data dictionary packages to be loaded for this module by the data dictionary service during system startup.
protected  DataDictionaryService dataDictionaryService
          the implementation of the data dictionary service to use for this module.
protected  String dataSourceName
           
protected  javax.persistence.EntityManager entityManager
           
protected  Map<Class,Class> externalizableBusinessObjectImplementations
           
protected  boolean initializeDataDictionary
           
protected  List<String> jobNames
           
protected  String namespaceCode
          the module's namespace.
protected  List<String> packagePrefixes
          the package name prefixes for classes used in this module
protected  PersistenceService persistenceService
           
protected  List<String> resourceBundleNames
           
protected  List<String> scriptConfigurationFilePaths
           
protected  List<String> triggerNames
           
 
Constructor Summary
ModuleConfiguration()
          Constructor for a ModuleConfiguration.
 
Method Summary
 void afterPropertiesSet()
          Performs additional custom initialization after the bean is created and it's properties are set by the Spring framework.
 List<String> getDatabaseRepositoryFilePaths()
          Retrieves the database repository file paths to be used by the persistence service configured for this module.
 List<String> getDataDictionaryPackages()
          Returns a list of data dictionary packages configured for this ModuleConfiguration.
 DataDictionaryService getDataDictionaryService()
           
 String getDataSourceName()
           
 javax.persistence.EntityManager getEntityManager()
           
 Map<Class,Class> getExternalizableBusinessObjectImplementations()
           
 List<String> getJobNames()
           
 String getNamespaceCode()
           
 List<String> getPackagePrefixes()
           
 PersistenceService getPersistenceService()
           
 List<String> getResourceBundleNames()
          List of resource bundle names that will provides messages for this module
 List<String> getScriptConfigurationFilePaths()
           
 List<String> getTriggerNames()
           
 boolean isInitializeDataDictionary()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setDatabaseRepositoryFilePaths(List<String> databaseRepositoryFilePaths)
          Initializes the list of database repository files to load during persistence service initialization.
 void setDataDictionaryPackages(List<String> dataDictionaryPackages)
          Initializes the list of data dictionary packages associated with this ModuleConfiguration.
 void setDataDictionaryService(DataDictionaryService dataDictionaryService)
           
 void setDataSourceName(String dataSourceName)
           
 void setEntityManager(javax.persistence.EntityManager entityManager)
           
 void setExternalizableBusinessObjectImplementations(Map<Class,Class> externalizableBusinessObjectImplementations)
           
 void setInitializeDataDictionary(boolean initializeDataDictionary)
           
 void setJobNames(List<String> jobNames)
           
 void setNamespaceCode(String namespaceCode)
           
 void setPackagePrefixes(List<String> packagePrefixes)
           
 void setPersistenceService(PersistenceService persistenceService)
           
 void setResourceBundleNames(List<String> resourceBundleNames)
          Setter for the list of resource bundle names that provides messages for the module
 void setScriptConfigurationFilePaths(List<String> scriptConfigurationFilePaths)
           
 void setTriggerNames(List<String> triggerNames)
           
protected  void trimList(List<String> stringList)
          This method passes by reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespaceCode

protected String namespaceCode
the module's namespace.


applicationContext

protected org.springframework.context.ApplicationContext applicationContext

packagePrefixes

protected List<String> packagePrefixes
the package name prefixes for classes used in this module


databaseRepositoryFilePaths

protected List<String> databaseRepositoryFilePaths
a list of entity description files to be loaded during initialization of the persistence service.

Currently only used by OJB repository service implementation.


dataDictionaryPackages

protected List<String> dataDictionaryPackages
the list of data dictionary packages to be loaded for this module by the data dictionary service during system startup.


scriptConfigurationFilePaths

protected List<String> scriptConfigurationFilePaths

jobNames

protected List<String> jobNames

triggerNames

protected List<String> triggerNames

resourceBundleNames

protected List<String> resourceBundleNames

dataSourceName

protected String dataSourceName

entityManager

protected javax.persistence.EntityManager entityManager

externalizableBusinessObjectImplementations

protected Map<Class,Class> externalizableBusinessObjectImplementations

initializeDataDictionary

protected boolean initializeDataDictionary

persistenceService

protected PersistenceService persistenceService

dataDictionaryService

protected DataDictionaryService dataDictionaryService
the implementation of the data dictionary service to use for this module.

Constructor Detail

ModuleConfiguration

public ModuleConfiguration()
Constructor for a ModuleConfiguration.

Initializes the arrays of this ModuleConfiguration to empty ArrayLists.

Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Performs additional custom initialization after the bean is created and it's properties are set by the Spring framework.

Loads the data dictionary packages configured for this module. Also loads any OJB database repository files configured.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

getDatabaseRepositoryFilePaths

public List<String> getDatabaseRepositoryFilePaths()
Retrieves the database repository file paths to be used by the persistence service configured for this module.

Used by the OBJ persistence service to load entity descriptors. The file paths are returned as a List of Strings. If no file paths are configured, an empty list is returned. This method should never return null.

Returns:
a List containing the databaseRepositoryFilePaths

setDatabaseRepositoryFilePaths

public void setDatabaseRepositoryFilePaths(List<String> databaseRepositoryFilePaths)
Initializes the list of database repository files to load during persistence service initialization.

The repository file names are listed in the module's Spring bean configuration file. This property is set during Spring initialization.

Parameters:
databaseRepositoryFilePaths - the List of entity descriptor files to load.

getDataDictionaryPackages

public List<String> getDataDictionaryPackages()
Returns a list of data dictionary packages configured for this ModuleConfiguration.

If no data dictionary packages are defined, will return an empty list. Should never return null.

Returns:
a List of Strings containing the names of the dataDictionaryPackages

setDataDictionaryPackages

public void setDataDictionaryPackages(List<String> dataDictionaryPackages)
Initializes the list of data dictionary packages associated with this ModuleConfiguration.

The data dictionary packages are listed in the module's Spring bean configuration file. This property is set during Spring initialization.

Parameters:
dataDictionaryPackages - a List of Strings containing the dataDictionaryPackages.

getExternalizableBusinessObjectImplementations

public Map<Class,Class> getExternalizableBusinessObjectImplementations()
Returns:
the externalizableBusinessObjectImplementations

setExternalizableBusinessObjectImplementations

public void setExternalizableBusinessObjectImplementations(Map<Class,Class> externalizableBusinessObjectImplementations)
Parameters:
externalizableBusinessObjectImplementations - the externalizableBusinessObjectImplementations to set

getPackagePrefixes

public List<String> getPackagePrefixes()

setPackagePrefixes

public void setPackagePrefixes(List<String> packagePrefixes)

setInitializeDataDictionary

public void setInitializeDataDictionary(boolean initializeDataDictionary)

getScriptConfigurationFilePaths

public List<String> getScriptConfigurationFilePaths()

getJobNames

public List<String> getJobNames()
Returns:
the jobNames

setJobNames

public void setJobNames(List<String> jobNames)
Parameters:
jobNames - the jobNames to set

getTriggerNames

public List<String> getTriggerNames()
Returns:
the triggerNames

setTriggerNames

public void setTriggerNames(List<String> triggerNames)
Parameters:
triggerNames - the triggerNames to set

getResourceBundleNames

public List<String> getResourceBundleNames()
List of resource bundle names that will provides messages for this module

Each bundle will point to a resource property file that contain key/value message pairs. The properties file should be on the classpath and the name is given by specifying the fully qualified class name (dot notation).

Returns:
List resource bundle names
See Also:
ResourceBundle

setResourceBundleNames

public void setResourceBundleNames(List<String> resourceBundleNames)
Setter for the list of resource bundle names that provides messages for the module

Parameters:
resourceBundleNames -

isInitializeDataDictionary

public boolean isInitializeDataDictionary()
Returns:
the initializeDataDictionary

setScriptConfigurationFilePaths

public void setScriptConfigurationFilePaths(List<String> scriptConfigurationFilePaths)
Parameters:
scriptConfigurationFilePaths - the scriptConfigurationFilePaths to set

getNamespaceCode

public String getNamespaceCode()
Returns:
the namespaceCode

setNamespaceCode

public void setNamespaceCode(String namespaceCode)
Parameters:
namespaceCode - the namespaceCode to set

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware

getDataDictionaryService

public DataDictionaryService getDataDictionaryService()
Returns:
the dataDictionaryService

setDataDictionaryService

public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
Parameters:
dataDictionaryService - the dataDictionaryService to set

getPersistenceService

public PersistenceService getPersistenceService()
Returns:
the persistenceService

setPersistenceService

public void setPersistenceService(PersistenceService persistenceService)
Parameters:
persistenceService - the persistenceService to set

getDataSourceName

public String getDataSourceName()

setDataSourceName

public void setDataSourceName(String dataSourceName)

getEntityManager

public javax.persistence.EntityManager getEntityManager()

setEntityManager

public void setEntityManager(javax.persistence.EntityManager entityManager)

trimList

protected void trimList(List<String> stringList)
This method passes by reference. It will alter the list passed in.

Parameters:
stringList -


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