org.makumba.providers
Class Configuration

java.lang.Object
  extended by org.makumba.providers.Configuration
All Implemented Interfaces:
Serializable

public class Configuration
extends Object
implements Serializable

This class knows how to read Makumba configuration and is used internally by different classes that need specific services. It can be seen as a service dispatcher in a way.

Version:
$Id: Configuration.java,v 1.1 28.09.2007 11:15:00 Manuel Exp $
Author:
Manuel Gay, Rudolf Mayer
See Also:
Serialized Form

Nested Class Summary
static class Configuration.DataSourceType
           
 
Field Summary
static String KEY_CALENDAR_EDITOR
           
static String KEY_CALENDAR_EDITOR_LINK
           
static String KEY_CLIENT_SIDE_VALIDATION
           
static String KEY_CODE_GENERATOR
           
static String KEY_DATA_LISTER
           
static String KEY_DATA_OBJECT_VIEWER
           
static String KEY_DATA_QUERY_TOOL
           
static String KEY_DEFAULT_DATABASE_LAYER
           
static String KEY_FORM_ANNOTATION
           
static String KEY_JAVA_VIEWER
           
static String KEY_LOGIC_DISCOVERY
           
static String KEY_MAKUMBA_AUTOCOMPLETE
           
static String KEY_MAKUMBA_CACHE_CLEANER
           
static String KEY_MAKUMBA_DOWNLOAD
           
static String KEY_MAKUMBA_RESOURCES
           
static String KEY_MAKUMBA_TOOLS
           
static String KEY_MAKUMBA_UNIQUENESS_VALIDATOR
           
static String KEY_MAKUMBA_VALUE_EDITOR
           
static String KEY_MDD_VIEWER
           
static String KEY_OBJECT_ID_CONVERTER
           
static String KEY_REFERENCE_CHECKER
           
static String KEY_RELATION_CRAWLER
           
static String KEY_RELOAD_FORM_ON_ERROR
           
static String KEY_REPOSITORY_LINK_TEXT
           
static String KEY_REPOSITORY_URL
           
static String KEY_USE_DEFAULT_RESPONSE_STYLES
           
(package private) static Logger logger
           
static String MAKUMBA_CONF
           
static String PLACEHOLDER_CONTEXT_PATH
           
static String PROPERTY_NOT_SET
           
 
Constructor Summary
Configuration()
           
 
Method Summary
static Map<String,String> getAllGenericDeveloperToolsMap()
           
static String getApplicationConfigurationSource()
           
static Map<String,Map<String,String>> getApplicationSpecificCodeGeneratorTemplates()
           
static Map<String,String> getAuthorizationDefinitions()
           
static boolean getCalendarEditorDefault()
           
static String getClientSideValidationDefault()
           
static String getCodeGeneratorLocation()
           
static String getDataDefinitionProviderClass()
          Gives the data definition provider implementation to use
static String getDataListerLocation()
           
static String getDataQueryLocation()
           
static Map<String,String> getDataSourceConfiguration(String dataSourceName)
          Returns the configuration for a specific dataSource.
static Configuration.DataSourceType getDataSourceType(String dataSourceName)
          Gives the type of the data source (makumba or hibernate)
static String getDataViewerLocation()
           
static String getDefaultCalendarEditorLink(String contextPath)
           
static String getDefaultDatabaseLayer()
          Gives the default database layer to use
static Map<String,String> getDefaultDataSourceConfiguration()
          the configuration properties of the default data source
static String getDefaultDataSourceName()
          Gives the name of the default data source, according to following determination method: If only one dataSource is configured, this one is used If several dataSources of the same name are configured and contain lookup parameters (host, working directory, ...), the one that matches the machine on which it runs is used The defaultDataSource named in the dataSourceConfig section is used
static String getDefaultFormAnnotation()
           
static Map<String,Map<String,String>> getInternalCodeGeneratorTemplates()
           
static String getJavaViewerLocation()
           
static Map<String,String> getJavaViewerSyntaxStyles()
           
static Map<String,String> getJspViewerSyntaxStyles()
           
static Map<String,String> getJspViewerSyntaxStylesTags()
           
static String getLogicDiscoveryViewerLocation()
           
static Map<String,String> getLogicPackages()
           
static String getMakumbaAutoCompleteLocation()
           
static String getMakumbaCacheCleanerLocation()
           
static String getMakumbaDownloadLocation()
           
static String getMakumbaRelationCrawlerLocation()
           
static String getMakumbaResourcesLocation()
           
static String getMakumbaToolsLocation()
           
static String getMakumbaToolsPathConfigProperty(String key)
           
static String getMakumbaUniqueLocation()
           
static String getMakumbaValueEditorLocation()
           
static String getMddViewerLocation()
           
static String getObjectIdConverterLocation()
           
static String getReferenceCheckerLocation()
           
static boolean getReloadFormOnErrorDefault()
           
static String getRepositoryLinkText()
           
static String getRepositoryURL()
           
static boolean getUseDefaultResponseStyles()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_NOT_SET

public static final String PROPERTY_NOT_SET
See Also:
Constant Field Values

KEY_CLIENT_SIDE_VALIDATION

public static final String KEY_CLIENT_SIDE_VALIDATION
See Also:
Constant Field Values

KEY_RELOAD_FORM_ON_ERROR

public static final String KEY_RELOAD_FORM_ON_ERROR
See Also:
Constant Field Values

KEY_FORM_ANNOTATION

public static final String KEY_FORM_ANNOTATION
See Also:
Constant Field Values

KEY_DEFAULT_DATABASE_LAYER

public static final String KEY_DEFAULT_DATABASE_LAYER
See Also:
Constant Field Values

MAKUMBA_CONF

public static final String MAKUMBA_CONF
See Also:
Constant Field Values

PLACEHOLDER_CONTEXT_PATH

public static final String PLACEHOLDER_CONTEXT_PATH
See Also:
Constant Field Values

KEY_CALENDAR_EDITOR

public static final String KEY_CALENDAR_EDITOR
See Also:
Constant Field Values

KEY_CALENDAR_EDITOR_LINK

public static final String KEY_CALENDAR_EDITOR_LINK
See Also:
Constant Field Values

KEY_MAKUMBA_TOOLS

public static final String KEY_MAKUMBA_TOOLS
See Also:
Constant Field Values

KEY_MDD_VIEWER

public static final String KEY_MDD_VIEWER
See Also:
Constant Field Values

KEY_JAVA_VIEWER

public static final String KEY_JAVA_VIEWER
See Also:
Constant Field Values

KEY_LOGIC_DISCOVERY

public static final String KEY_LOGIC_DISCOVERY
See Also:
Constant Field Values

KEY_CODE_GENERATOR

public static final String KEY_CODE_GENERATOR
See Also:
Constant Field Values

KEY_DATA_QUERY_TOOL

public static final String KEY_DATA_QUERY_TOOL
See Also:
Constant Field Values

KEY_DATA_OBJECT_VIEWER

public static final String KEY_DATA_OBJECT_VIEWER
See Also:
Constant Field Values

KEY_DATA_LISTER

public static final String KEY_DATA_LISTER
See Also:
Constant Field Values

KEY_OBJECT_ID_CONVERTER

public static final String KEY_OBJECT_ID_CONVERTER
See Also:
Constant Field Values

KEY_REFERENCE_CHECKER

public static final String KEY_REFERENCE_CHECKER
See Also:
Constant Field Values

KEY_RELATION_CRAWLER

public static final String KEY_RELATION_CRAWLER
See Also:
Constant Field Values

KEY_REPOSITORY_URL

public static final String KEY_REPOSITORY_URL
See Also:
Constant Field Values

KEY_REPOSITORY_LINK_TEXT

public static final String KEY_REPOSITORY_LINK_TEXT
See Also:
Constant Field Values

KEY_USE_DEFAULT_RESPONSE_STYLES

public static final String KEY_USE_DEFAULT_RESPONSE_STYLES
See Also:
Constant Field Values

KEY_MAKUMBA_VALUE_EDITOR

public static final String KEY_MAKUMBA_VALUE_EDITOR
See Also:
Constant Field Values

KEY_MAKUMBA_UNIQUENESS_VALIDATOR

public static final String KEY_MAKUMBA_UNIQUENESS_VALIDATOR
See Also:
Constant Field Values

KEY_MAKUMBA_AUTOCOMPLETE

public static final String KEY_MAKUMBA_AUTOCOMPLETE
See Also:
Constant Field Values

KEY_MAKUMBA_RESOURCES

public static final String KEY_MAKUMBA_RESOURCES
See Also:
Constant Field Values

KEY_MAKUMBA_DOWNLOAD

public static final String KEY_MAKUMBA_DOWNLOAD
See Also:
Constant Field Values

KEY_MAKUMBA_CACHE_CLEANER

public static final String KEY_MAKUMBA_CACHE_CLEANER
See Also:
Constant Field Values

logger

static Logger logger
Constructor Detail

Configuration

public Configuration()
Method Detail

getAllGenericDeveloperToolsMap

public static Map<String,String> getAllGenericDeveloperToolsMap()

getDataDefinitionProviderClass

public static String getDataDefinitionProviderClass()
Gives the data definition provider implementation to use

Returns:
a String containing the class name of the data definition provider implementation

getDefaultDatabaseLayer

public static String getDefaultDatabaseLayer()
Gives the default database layer to use

Returns:
"makumba" or "hibernate"

getClientSideValidationDefault

public static String getClientSideValidationDefault()

getReloadFormOnErrorDefault

public static boolean getReloadFormOnErrorDefault()

getDefaultFormAnnotation

public static String getDefaultFormAnnotation()

getUseDefaultResponseStyles

public static boolean getUseDefaultResponseStyles()

getCalendarEditorDefault

public static boolean getCalendarEditorDefault()

getDefaultCalendarEditorLink

public static String getDefaultCalendarEditorLink(String contextPath)

getRepositoryURL

public static String getRepositoryURL()

getRepositoryLinkText

public static String getRepositoryLinkText()

getMakumbaToolsLocation

public static String getMakumbaToolsLocation()

getMddViewerLocation

public static String getMddViewerLocation()

getJavaViewerLocation

public static String getJavaViewerLocation()

getLogicDiscoveryViewerLocation

public static String getLogicDiscoveryViewerLocation()

getDataViewerLocation

public static String getDataViewerLocation()

getDataListerLocation

public static String getDataListerLocation()

getDataQueryLocation

public static String getDataQueryLocation()

getObjectIdConverterLocation

public static String getObjectIdConverterLocation()

getReferenceCheckerLocation

public static String getReferenceCheckerLocation()

getCodeGeneratorLocation

public static String getCodeGeneratorLocation()

getMakumbaValueEditorLocation

public static String getMakumbaValueEditorLocation()

getMakumbaRelationCrawlerLocation

public static String getMakumbaRelationCrawlerLocation()

getMakumbaUniqueLocation

public static String getMakumbaUniqueLocation()

getMakumbaAutoCompleteLocation

public static String getMakumbaAutoCompleteLocation()

getMakumbaResourcesLocation

public static String getMakumbaResourcesLocation()

getMakumbaDownloadLocation

public static String getMakumbaDownloadLocation()

getMakumbaCacheCleanerLocation

public static String getMakumbaCacheCleanerLocation()

getMakumbaToolsPathConfigProperty

public static String getMakumbaToolsPathConfigProperty(String key)

getJavaViewerSyntaxStyles

public static Map<String,String> getJavaViewerSyntaxStyles()

getJspViewerSyntaxStyles

public static Map<String,String> getJspViewerSyntaxStyles()

getJspViewerSyntaxStylesTags

public static Map<String,String> getJspViewerSyntaxStylesTags()

getInternalCodeGeneratorTemplates

public static Map<String,Map<String,String>> getInternalCodeGeneratorTemplates()

getApplicationSpecificCodeGeneratorTemplates

public static Map<String,Map<String,String>> getApplicationSpecificCodeGeneratorTemplates()

getLogicPackages

public static Map<String,String> getLogicPackages()

getAuthorizationDefinitions

public static Map<String,String> getAuthorizationDefinitions()

getApplicationConfigurationSource

public static String getApplicationConfigurationSource()

getDataSourceConfiguration

public static Map<String,String> getDataSourceConfiguration(String dataSourceName)
Returns the configuration for a specific dataSource. If more than one dataSource with the same name are found, performs lookup.


getDataSourceType

public static Configuration.DataSourceType getDataSourceType(String dataSourceName)
Gives the type of the data source (makumba or hibernate)


getDefaultDataSourceName

public static String getDefaultDataSourceName()
Gives the name of the default data source, according to following determination method:
  1. If only one dataSource is configured, this one is used
  2. If several dataSources of the same name are configured and contain lookup parameters (host, working directory, ...), the one that matches the machine on which it runs is used
  3. The defaultDataSource named in the dataSourceConfig section is used

Returns:
the name of the dataSource to use by default

getDefaultDataSourceConfiguration

public static Map<String,String> getDefaultDataSourceConfiguration()
the configuration properties of the default data source