[
https://issues.apache.org/jira/browse/MYFACES-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Leonardo Uribe updated MYFACES-3347:
------------------------------------
Resolution: Fixed
Fix Version/s: 2.1.4
2.0.10
Status: Resolved (was: Patch Available)
> Improve web config param logging and enhance @JSFWebConfigParam
> ---------------------------------------------------------------
>
> Key: MYFACES-3347
> URL: https://issues.apache.org/jira/browse/MYFACES-3347
> Project: MyFaces Core
> Issue Type: Improvement
> Components: JSR-314
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 2.0.10, 2.1.4
>
> Attachments: MYFACES-3347-core.patch, MYFACES-3347-mbp.patch
>
>
> Right now, some params are logged when myfaces is started or shutdown. Such
> log is done on MyfacesConfig class. It has the following problems:
> - Logging about application startup should be done on
> AbstractFacesInitializer.
> - That log should only be done on Production and Development project stage.
> For UnitTest and SystemTest, it should be silently ignored.
> - A web config param should be used to enable/disable.
> - All web config params not configured should be logged, not only the ones
> defined on MyfacesConfig.
> - Deprecated params should not be logged.
> - Params with expected values should be checked, and if it fails, log a
> warning message.
> To solve all that problems, the idea is add the following fields to
> @JSFWebConfigParam:
> /**
> * The group which the param belongs.
> *
> * <p>These are the groups used in myfaces core:</p>
> * <ul>
> * <li>state</li>
> * <li>resources</li>
> * <li>viewhandler</li>
> * <li>validation</li>
> * <li>render</li>
> * <li>EL</li>
> * </ul>
> *
> * @return
> */
> String group() default "";
> /**
> * The tag(s) or clasification(s), separated by commas
> * that this web config param can be clasified.
> *
> * <p>These are the tags used in myfaces core:</p>
> * <ul>
> * <li>tomahawk</li>
> * <li>performance</li>
> * </ul>
> *
> *
> * @return
> */
> String tags() default "";
>
> /**
> * Indicate if the param was deprecated or not.
> *
> * @return
> */
> boolean deprecated() default false;
> /**
> * Indicate an alias or alternate name for this param.
> * @return
> */
> String alias() default "";
>
> /**
> * Indicate if this param ignore upper or lower case when read params
> * @return
> */
> boolean ignoreUpperLowerCase() default false;
>
> /**
> * The java type or class which this param is converted
> *
> * @return
> */
> String classType() default "";
> And create a class that generate this automatically using myfaces builder
> plugin make-config goal. In that way, each time we add a @JSFWebConfigParam
> annotation, the code will be synchronized automatically. Definitively this
> strategy is easier than create a class that hold all web config params,
> because it is more "flexible" and simple. Just create a constant, and the
> annotation and that's it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira