|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.config.DefaultConfiguration
net.sourceforge.stripes.config.RuntimeConfiguration
public class RuntimeConfiguration
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:
Field Summary | |
---|---|
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 Summary | |
---|---|
RuntimeConfiguration()
|
Method Summary | ||
---|---|---|
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
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public 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
Constructor Detail |
---|
public RuntimeConfiguration()
Method Detail |
---|
protected 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 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 DefaultConfiguration
LifecycleStage
to Collection of Interceptor
protected 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 DefaultConfiguration
LifecycleStage
to Collection of Interceptor
protected 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 Interceptor
protected <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 name
public void init()
BootstrapPropertyResolver.PACKAGES
to their respective factories.
init
in interface Configuration
init
in class DefaultConfiguration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |