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 String |
ACTION_BEAN_CONTEXT_FACTORY
The Configuration Key for looking up the name of an ActionBeanContextFactory class.
|
static String |
ACTION_BEAN_PROPERTY_BINDER
The Configuration Key for looking up the name of the ActionResolver class.
|
static String |
ACTION_RESOLVER
The Configuration Key for looking up the name of the ActionResolver class.
|
static String |
CORE_INTERCEPTOR_LIST
The Configuration Key for looking up the comma separated list of core interceptor classes.
|
static String |
DEBUG_MODE
The Configuration Key for enabling debug mode.
|
static String |
EXCEPTION_HANDLER
The Configuration Key for looking up the name of the ExceptionHandler class
|
static String |
FORMATTER_FACTORY
The Configuration Key for looking up the name of the FormatterFactory class.
|
static String |
INTERCEPTOR_LIST
The Configuration Key for looking up the comma separated list of interceptor classes.
|
static String |
LOCALE_PICKER
The Configuration Key for looking up the name of the LocalizationBundleFactory class.
|
static String |
LOCALIZATION_BUNDLE_FACTORY
The Configuration Key for looking up the name of the LocalizationBundleFactory class.
|
static String |
MULTIPART_WRAPPER_FACTORY
The Configuration Key for looking up the name of the MultipartWrapperFactory class
|
static String |
POPULATION_STRATEGY
The Configuration Key for looking up the name of the PopulationStrategy class
|
static String |
TAG_ERROR_RENDERER_FACTORY
The Configuration Key for looking up the name of the TagErrorRendererFactory class
|
static String |
TYPE_CONVERTER_FACTORY
The Configuration Key for looking up the name of the TypeConverterFactory class.
|
static 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 Map<LifecycleStage,Collection<Interceptor>> |
initCoreInterceptors()
Looks for a list of class names separated by commas under the configuration key
CORE_INTERCEPTOR_LIST. |
protected 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(Class<T> componentType,
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 Map<LifecycleStage,Collection<Interceptor>> |
initInterceptors()
Looks for a list of class names separated by commas under the configuration key
INTERCEPTOR_LIST. |
protected Map<LifecycleStage,Collection<Interceptor>> |
initInterceptors(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, setDebugModepublic static final String DEBUG_MODE
public static final String ACTION_RESOLVER
public static final String ACTION_BEAN_PROPERTY_BINDER
public static final String ACTION_BEAN_CONTEXT_FACTORY
public static final String TYPE_CONVERTER_FACTORY
public static final String LOCALIZATION_BUNDLE_FACTORY
public static final String LOCALE_PICKER
public static final String FORMATTER_FACTORY
public static final String TAG_ERROR_RENDERER_FACTORY
public static final String POPULATION_STRATEGY
public static final String EXCEPTION_HANDLER
public static final String MULTIPART_WRAPPER_FACTORY
public static final String VALIDATION_METADATA_PROVIDER
public static final String CORE_INTERCEPTOR_LIST
public static final String INTERCEPTOR_LIST
protected Boolean initDebugMode()
initDebugMode in class DefaultConfigurationprotected ActionResolver initActionResolver()
initActionResolver in class DefaultConfigurationprotected ActionBeanPropertyBinder initActionBeanPropertyBinder()
initActionBeanPropertyBinder in class DefaultConfigurationprotected ActionBeanContextFactory initActionBeanContextFactory()
initActionBeanContextFactory in class DefaultConfigurationprotected TypeConverterFactory initTypeConverterFactory()
initTypeConverterFactory in class DefaultConfigurationprotected LocalizationBundleFactory initLocalizationBundleFactory()
initLocalizationBundleFactory in class DefaultConfigurationprotected LocalePicker initLocalePicker()
initLocalePicker in class DefaultConfigurationprotected FormatterFactory initFormatterFactory()
initFormatterFactory in class DefaultConfigurationprotected TagErrorRendererFactory initTagErrorRendererFactory()
initTagErrorRendererFactory in class DefaultConfigurationprotected PopulationStrategy initPopulationStrategy()
initPopulationStrategy in class DefaultConfigurationprotected ExceptionHandler initExceptionHandler()
initExceptionHandler in class DefaultConfigurationprotected MultipartWrapperFactory initMultipartWrapperFactory()
initMultipartWrapperFactory in class DefaultConfigurationprotected ValidationMetadataProvider initValidationMetadataProvider()
initValidationMetadataProvider in class DefaultConfigurationprotected Map<LifecycleStage,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 DefaultConfigurationLifecycleStage to Collection of Interceptorprotected Map<LifecycleStage,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 DefaultConfigurationLifecycleStage to Collection of Interceptorprotected Map<LifecycleStage,Collection<Interceptor>> initInterceptors(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 Interceptorprotected <T extends ConfigurableComponent> T initializeComponent(Class<T> componentType, 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 Configurationinit in class DefaultConfiguration© Copyright 2005-2006, Stripes Development Team.