public class RuntimeConfiguration extends DefaultConfiguration
Configuration class that uses the BootstrapPropertyResolver to look for configuration values, and when it cannot find a value, falls back on the DefaultConfiguration to supply default values. In general, the RuntimeConfiguration will operate in the following pattern:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_BEAN_CONTEXT_FACTORY
The Configuration Key for looking up the name of an ActionBeanContextFactory class.
|
static java.lang.String |
ACTION_BEAN_PROPERTY_BINDER
The Configuration Key for looking up the name of the ActionResolver class.
|
static java.lang.String |
ACTION_RESOLVER
The Configuration Key for looking up the name of the ActionResolver class.
|
static java.lang.String |
CORE_INTERCEPTOR_LIST
The Configuration Key for looking up the comma separated list of core interceptor classes.
|
static java.lang.String |
DEBUG_MODE
The Configuration Key for enabling debug mode.
|
static java.lang.String |
EXCEPTION_HANDLER
The Configuration Key for looking up the name of the ExceptionHandler class
|
static java.lang.String |
FORMATTER_FACTORY
The Configuration Key for looking up the name of the FormatterFactory class.
|
static java.lang.String |
INTERCEPTOR_LIST
The Configuration Key for looking up the comma separated list of interceptor classes.
|
static java.lang.String |
LOCALE_PICKER
The Configuration Key for looking up the name of the LocalizationBundleFactory class.
|
static java.lang.String |
LOCALIZATION_BUNDLE_FACTORY
The Configuration Key for looking up the name of the LocalizationBundleFactory class.
|
static java.lang.String |
MULTIPART_WRAPPER_FACTORY
The Configuration Key for looking up the name of the MultipartWrapperFactory class
|
static java.lang.String |
POPULATION_STRATEGY
The Configuration Key for looking up the name of the PopulationStrategy class
|
static java.lang.String |
TAG_ERROR_RENDERER_FACTORY
The Configuration Key for looking up the name of the TagErrorRendererFactory class
|
static java.lang.String |
TYPE_CONVERTER_FACTORY
The Configuration Key for looking up the name of the TypeConverterFactory class.
|
static java.lang.String |
VALIDATION_METADATA_PROVIDER
The Configuration Key for looking up the name of the ValidationMetadataProvider class
|
Constructor and Description |
---|
RuntimeConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
init()
Calls super.init() then adds Formatters and TypeConverters found in
packages listed in
BootstrapPropertyResolver.PACKAGES to their respective factories. |
protected ActionBeanContextFactory |
initActionBeanContextFactory()
Looks for a class name in config and uses that to create the component.
|
protected ActionBeanPropertyBinder |
initActionBeanPropertyBinder()
Looks for a class name in config and uses that to create the component.
|
protected ActionResolver |
initActionResolver()
Looks for a class name in config and uses that to create the component.
|
protected java.util.Map<LifecycleStage,java.util.Collection<Interceptor>> |
initCoreInterceptors()
Looks for a list of class names separated by commas under the configuration key
CORE_INTERCEPTOR_LIST . |
protected java.lang.Boolean |
initDebugMode()
Looks for a true/false value in config.
|
protected ExceptionHandler |
initExceptionHandler()
Looks for a class name in config and uses that to create the component.
|
protected FormatterFactory |
initFormatterFactory()
Looks for a class name in config and uses that to create the component.
|
protected <T extends ConfigurableComponent> |
initializeComponent(java.lang.Class<T> componentType,
java.lang.String propertyName)
Internal utility method that is used to implement the main pattern of this class: lookup the
name of a class based on a property name, instantiate the named class and initialize it.
|
protected java.util.Map<LifecycleStage,java.util.Collection<Interceptor>> |
initInterceptors()
Looks for a list of class names separated by commas under the configuration key
INTERCEPTOR_LIST . |
protected java.util.Map<LifecycleStage,java.util.Collection<Interceptor>> |
initInterceptors(java.util.List classes)
Splits a comma-separated list of class names and maps each
LifecycleStage to the
interceptors in the list that intercept it. |
protected LocalePicker |
initLocalePicker()
Looks for a class name in config and uses that to create the component.
|
protected LocalizationBundleFactory |
initLocalizationBundleFactory()
Looks for a class name in config and uses that to create the component.
|
protected MultipartWrapperFactory |
initMultipartWrapperFactory()
Looks for a class name in config and uses that to create the component.
|
protected PopulationStrategy |
initPopulationStrategy()
Looks for a class name in config and uses that to create the component.
|
protected TagErrorRendererFactory |
initTagErrorRendererFactory()
Looks for a class name in config and uses that to create the component.
|
protected TypeConverterFactory |
initTypeConverterFactory()
Looks for a class name in config and uses that to create the component.
|
protected ValidationMetadataProvider |
initValidationMetadataProvider()
Looks for a class name in config and uses that to create the component.
|
addInterceptor, getActionBeanContextFactory, getActionBeanPropertyBinder, getActionResolver, getBootstrapPropertyResolver, getExceptionHandler, getFormatterFactory, getInterceptors, getLocalePicker, getLocalizationBundleFactory, getMultipartWrapperFactory, getPopulationStrategy, getServletContext, getTagErrorRendererFactory, getTypeConverterFactory, getValidationMetadataProvider, isDebugMode, mergeInterceptorMaps, setBootstrapPropertyResolver, setDebugMode
public static final java.lang.String DEBUG_MODE
public static final java.lang.String ACTION_RESOLVER
public static final java.lang.String ACTION_BEAN_PROPERTY_BINDER
public static final java.lang.String ACTION_BEAN_CONTEXT_FACTORY
public static final java.lang.String TYPE_CONVERTER_FACTORY
public static final java.lang.String LOCALIZATION_BUNDLE_FACTORY
public static final java.lang.String LOCALE_PICKER
public static final java.lang.String FORMATTER_FACTORY
public static final java.lang.String TAG_ERROR_RENDERER_FACTORY
public static final java.lang.String POPULATION_STRATEGY
public static final java.lang.String EXCEPTION_HANDLER
public static final java.lang.String MULTIPART_WRAPPER_FACTORY
public static final java.lang.String VALIDATION_METADATA_PROVIDER
public static final java.lang.String CORE_INTERCEPTOR_LIST
public static final java.lang.String INTERCEPTOR_LIST
protected java.lang.Boolean initDebugMode()
initDebugMode
in class DefaultConfiguration
protected ActionResolver initActionResolver()
initActionResolver
in class DefaultConfiguration
protected ActionBeanPropertyBinder initActionBeanPropertyBinder()
initActionBeanPropertyBinder
in class DefaultConfiguration
protected ActionBeanContextFactory initActionBeanContextFactory()
initActionBeanContextFactory
in class DefaultConfiguration
protected TypeConverterFactory initTypeConverterFactory()
initTypeConverterFactory
in class DefaultConfiguration
protected LocalizationBundleFactory initLocalizationBundleFactory()
initLocalizationBundleFactory
in class DefaultConfiguration
protected LocalePicker initLocalePicker()
initLocalePicker
in class DefaultConfiguration
protected FormatterFactory initFormatterFactory()
initFormatterFactory
in class DefaultConfiguration
protected TagErrorRendererFactory initTagErrorRendererFactory()
initTagErrorRendererFactory
in class DefaultConfiguration
protected PopulationStrategy initPopulationStrategy()
initPopulationStrategy
in class DefaultConfiguration
protected ExceptionHandler initExceptionHandler()
initExceptionHandler
in class DefaultConfiguration
protected MultipartWrapperFactory initMultipartWrapperFactory()
initMultipartWrapperFactory
in class DefaultConfiguration
protected ValidationMetadataProvider initValidationMetadataProvider()
initValidationMetadataProvider
in class DefaultConfiguration
protected java.util.Map<LifecycleStage,java.util.Collection<Interceptor>> initCoreInterceptors()
CORE_INTERCEPTOR_LIST
. White space surrounding the class names is trimmed,
the classes instantiated and then stored under the lifecycle stage(s) they should
intercept.initCoreInterceptors
in class DefaultConfiguration
LifecycleStage
to Collection of Interceptor
protected java.util.Map<LifecycleStage,java.util.Collection<Interceptor>> initInterceptors()
INTERCEPTOR_LIST
. White space surrounding the class names is trimmed,
the classes instantiated and then stored under the lifecycle stage(s) they should
intercept.initInterceptors
in class DefaultConfiguration
LifecycleStage
to Collection of Interceptor
protected java.util.Map<LifecycleStage,java.util.Collection<Interceptor>> initInterceptors(java.util.List classes)
LifecycleStage
to the
interceptors in the list that intercept it. Also automatically finds Interceptors in
packages listed in BootstrapPropertyResolver.PACKAGES
if searchExtensionPackages is true.LifecycleStage
to Collection of Interceptor
protected <T extends ConfigurableComponent> T initializeComponent(java.lang.Class<T> componentType, java.lang.String propertyName)
componentType
- a Class object representing a subclass of ConfigurableComponentpropertyName
- the name of the property to look up for the class namepublic void init()
BootstrapPropertyResolver.PACKAGES
to their respective factories.init
in interface Configuration
init
in class DefaultConfiguration
? Copyright 2005-2006, Stripes Development Team.