|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Configuration
Type safe interface for accessing configuration information used to configure Stripes. All Configuration implementations are handed a reference to the BootstrapPropertyResolver to enable them to find initial values and fully initialize themselves. Through the BootstrapPropertyResolver implementations also get access to the ServletConfig of the DispatcherServlet which can be used for locating configuration values if desired.
Implementations of Configuration should fail fast. At initialization time they should detect as many failures as possible and raise an exception. Since exceptions in Configuration are considered fatal there are no exception specifications and implementations are expected to throw runtime exceptions with plenty of details about the failure and its suspected cause(s).
Method Summary | |
---|---|
ActionBeanContextFactory |
getActionBeanContextFactory()
Returns an instance of an action bean context factory which will used throughout Stripes to manufacture ActionBeanContext objects. |
ActionBeanPropertyBinder |
getActionBeanPropertyBinder()
Returns an instance of ActionBeanPropertyBinder that is responsible for binding all properties to all ActionBeans at runtime. |
ActionResolver |
getActionResolver()
Returns an instance of ActionResolver that will be used by Stripes to lookup and resolve ActionBeans. |
BootstrapPropertyResolver |
getBootstrapPropertyResolver()
Implementations should implement this method to simply return a reference to the BootstrapPropertyResolver passed to the Configuration at initialization time. |
ExceptionHandler |
getExceptionHandler()
Returns an instance of ExceptionHandler that can be used by Stripes to handle any exceptions that arise as the result of processing a request. |
FormatterFactory |
getFormatterFactory()
Returns an instance of FormatterFactory that is responsible for creating Formatter objects for converting rich types into Strings for display on pages. |
Collection<Interceptor> |
getInterceptors(LifecycleStage stage)
Fetches the interceptors that should be executed around the lifecycle stage applied. |
LocalePicker |
getLocalePicker()
Returns an instance of LocalePicker that is responsible for choosing the Locale for each request that enters the system. |
LocalizationBundleFactory |
getLocalizationBundleFactory()
Returns an instance of LocalizationBundleFactory that is responsible for looking up resource bundles for the varying localization needs of a web application. |
MultipartWrapperFactory |
getMultipartWrapperFactory()
Returns an instance of MultipartWrapperFactory that can be used by Stripes to construct MultipartWrapper instances for dealing with multipart requests (those containing file uploads). |
PopulationStrategy |
getPopulationStrategy()
Returns an instance of a PopulationStrategy that determines from where a tag's value should be repopulated. |
ServletContext |
getServletContext()
Retrieves the ServletContext for the context within which the Stripes application is executing. |
TagErrorRendererFactory |
getTagErrorRendererFactory()
Returns an instance of a tag error renderer factory for building custom error renderers for form input tags that have field errors. |
TypeConverterFactory |
getTypeConverterFactory()
Returns an instance of TypeConverterFactory that is responsible for providing lookups and instances of TypeConverters for the validation system. |
ValidationMetadataProvider |
getValidationMetadataProvider()
Returns an instance of ValidationMetadataProvider that can be used by Stripes to
determine what validations need to be applied during
LifecycleStage.BindingAndValidation . |
void |
init()
Called by the DispatcherServlet to initialize the Configuration. |
boolean |
isDebugMode()
Returns true if the Stripes application is running in debug mode. |
void |
setBootstrapPropertyResolver(BootstrapPropertyResolver resolver)
Supplies the Configuration with a BootstrapPropertyResolver. |
void |
setDebugMode(boolean debugMode)
Enable or disable debug mode. |
Method Detail |
---|
void setBootstrapPropertyResolver(BootstrapPropertyResolver resolver)
resolver
- a BootStrapPropertyResolver which can be used to find any values required
by the Configuration in order to initializevoid init()
BootstrapPropertyResolver getBootstrapPropertyResolver()
ServletContext getServletContext()
void setDebugMode(boolean debugMode)
boolean isDebugMode()
ActionResolver getActionResolver()
ActionBeanPropertyBinder getActionBeanPropertyBinder()
TypeConverterFactory getTypeConverterFactory()
LocalizationBundleFactory getLocalizationBundleFactory()
LocalePicker getLocalePicker()
FormatterFactory getFormatterFactory()
TagErrorRendererFactory getTagErrorRendererFactory()
PopulationStrategy getPopulationStrategy()
ActionBeanContextFactory getActionBeanContextFactory()
Collection<Interceptor> getInterceptors(LifecycleStage stage)
ExceptionHandler getExceptionHandler()
MultipartWrapperFactory getMultipartWrapperFactory()
ValidationMetadataProvider getValidationMetadataProvider()
ValidationMetadataProvider
that can be used by Stripes to
determine what validations need to be applied during
LifecycleStage.BindingAndValidation
.
ValidationMetadataProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |