[
http://www.stripesframework.org/jira/browse/STS-810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter resolved STS-810.
----------------------------
Resolution: Fixed
Fix Version/s: Release 1.6
Release 1.5.7
Assignee: Ben Gunter
Fixed for 1.5.7 and 1.6
> Make StripesFilter more subclass-friendly
> -----------------------------------------
>
> Key: STS-810
> URL: http://www.stripesframework.org/jira/browse/STS-810
> Project: Stripes
> Issue Type: Improvement
> Components: ActionBean Dispatching
> Affects Versions: Release 1.5.5
> Reporter: Simon Kitching
> Assignee: Ben Gunter
> Fix For: Release 1.5.7, Release 1.6
>
>
> Class StripesFilter has private members "configuration" and "configurations"
> which have no corresponding getters/setters. It is therefore currently
> impossible for a subclass of StripesFilter to access these fields.
> Being able to customise the configuration instance is very useful -
> particularly when using a dependency-injection framework that can be used to
> instantiate and configure a custom Configuration instance.
> Property "RuntimeConfiguration.ACTION_RESOLVER" can be used to specify which
> class to use for the Configuration member, but the object will be created via
> newInstance(), not via any dependency-injection framework.
> Suggestion: In method StripesFilter.init(FilterConfig), factor out the code
> that creates the configuration instance into a separate protected-scope
> method:
>
> public void init(FilterConfig filterConfig) throws ServletException {
> BootstrapPropertyResolver bootstrap = new
> BootstrapPropertyResolver(filterConfig);
>
> this.configuration = createConfiguration(filterConfig, bootstrap);
> .. rest of method as before ..
> }
>
> /**
> * Create an instance of the Configuration interface which this
> * filter instance will use.
> */
> protected Configuration createConfiguration(
> FilterConfig filterConfig, BootstrapPropertyResolver bootstrap)
> throws StripesServletException {
> .. code factored out from init method
> }
>
> I've provided the createConfiguration method with the filterConfig param
> because some customisations of this method might want to use data from
> this object to select or configure the created Configuration object.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development