You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/10/06 21:10:00 UTC
svn commit: r1179773 - in /myfaces/core/branches/2.0.x: ./
api/src/main/java/javax/faces/application/
api/src/main/java/javax/faces/component/
api/src/main/java/javax/faces/convert/
api/src/main/java/javax/faces/validator/ api/src/main/java/javax/faces...
Author: lu4242
Date: Thu Oct 6 19:09:59 2011
New Revision: 1179773
URL: http://svn.apache.org/viewvc?rev=1179773&view=rev
Log:
MYFACES-3347 Improve web config param logging and enhance @JSFWebConfigParam
Added:
myfaces/core/branches/2.0.x/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm
Modified:
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ResourceHandler.java
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/StateManager.java
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ViewHandler.java
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIInput.java
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/convert/EnumConverter.java
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/BeanValidator.java
myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java
myfaces/core/branches/2.0.x/impl/pom.xml
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/el/unified/ResolverBuilderBase.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/ServerSideStateCacheImpl.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/resource/InternalClassLoaderResourceLoader.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java
myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
myfaces/core/branches/2.0.x/pom.xml
myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java
myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java
myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java
myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java
myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ResourceHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ResourceHandler.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ResourceHandler.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ResourceHandler.java Thu Oct 6 19:09:59 2011
@@ -38,7 +38,7 @@ public abstract class ResourceHandler
/**
* Space separated file extensions that will not be served by the default ResourceHandler implementation.
*/
- @JSFWebConfigParam(defaultValue=".class .jsp .jspx .properties .xhtml",since="2.0")
+ @JSFWebConfigParam(defaultValue=".class .jsp .jspx .properties .xhtml",since="2.0", group="resources")
public static final String RESOURCE_EXCLUDES_PARAM_NAME = "javax.faces.RESOURCE_EXCLUDES";
public static final String RESOURCE_IDENTIFIER = "/javax.faces.resource";
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/StateManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/StateManager.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/StateManager.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/StateManager.java Thu Oct 6 19:09:59 2011
@@ -76,7 +76,7 @@ public abstract class StateManager
* token is embedded in the data rendered to the user.
* </p>
*/
- @JSFWebConfigParam(defaultValue="server", expectedValues="server,client", since="1.1",
+ @JSFWebConfigParam(defaultValue="server", expectedValues="server,client", since="1.1", group="state", tags="performance",
desc="Define the state method to be used. There are two different options defined by the specification: 'client' and 'server' state.")
public static final String STATE_SAVING_METHOD_PARAM_NAME = "javax.faces.STATE_SAVING_METHOD";
public static final String STATE_SAVING_METHOD_CLIENT = "client";
@@ -85,7 +85,7 @@ public abstract class StateManager
/**
* Indicate the viewId(s) separated by commas that should be saved and restored fully, without use Partial State Saving (PSS).
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", group="state")
public static final String FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME = "javax.faces.FULL_STATE_SAVING_VIEW_IDS";
/**
@@ -96,7 +96,7 @@ public abstract class StateManager
* state of the view.</p>
* <p>If the webapp faces-config file version is 2.0 or upper the default value is true, otherwise is false.</p>
*/
- @JSFWebConfigParam(expectedValues="true,false", since="2.0", defaultValue="true (false with 1.2 webapps)")
+ @JSFWebConfigParam(expectedValues="true,false", since="2.0", defaultValue="true (false with 1.2 webapps)", tags="performance", group="state")
public static final String PARTIAL_STATE_SAVING_PARAM_NAME = "javax.faces.PARTIAL_STATE_SAVING";
private Boolean _savingStateInClient = null;
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ViewHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ViewHandler.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ViewHandler.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/application/ViewHandler.java Thu Oct 6 19:09:59 2011
@@ -77,19 +77,19 @@ public abstract class ViewHandler
* Indicate the default suffixes, separated by spaces to derive the default file URI
* used by JSF to create views and render pages.
*/
- @JSFWebConfigParam(defaultValue=".xhtml .jsp", since="1.1")
+ @JSFWebConfigParam(defaultValue=".xhtml .jsp", since="1.1", group="viewhandler")
public static final String DEFAULT_SUFFIX_PARAM_NAME = "javax.faces.DEFAULT_SUFFIX";
/**
* The default extension used to handle facelets pages.
*/
- @JSFWebConfigParam(defaultValue=".xhtml", since="2.0")
+ @JSFWebConfigParam(defaultValue=".xhtml", since="2.0", group="viewhandler")
public static final String FACELETS_SUFFIX_PARAM_NAME = "javax.faces.FACELETS_SUFFIX";
/**
* Set of extensions handled by facelets, separated by ';'.
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", group="viewhandler")
public static final String FACELETS_VIEW_MAPPINGS_PARAM_NAME = "javax.faces.FACELETS_VIEW_MAPPINGS";
// TODO: Notify EG on that last constant. Using the Facelets' param as well for backward compatiblity is
// silly. If an application uses Facelets then they'll be using facelets.jar. Once they chose to
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIInput.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIInput.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIInput.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/component/UIInput.java Thu Oct 6 19:09:59 2011
@@ -74,7 +74,7 @@ public class UIInput extends UIOutput im
* Force validation on empty fields (By default is auto, which means it is only
* enabled when Bean Validation binaries are available on the current classpath).
*/
- @JSFWebConfigParam(defaultValue="auto", expectedValues="auto, true, false", since="2.0")
+ @JSFWebConfigParam(defaultValue="auto", expectedValues="auto, true, false", since="2.0", group="validation")
public static final String VALIDATE_EMPTY_FIELDS_PARAM_NAME = "javax.faces.VALIDATE_EMPTY_FIELDS";
/**
@@ -82,7 +82,7 @@ public class UIInput extends UIOutput im
*
* <p>Note this param is ignored for components extending from UISelectOne/UISelectMany.</p>
**/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true, false", since="2.0")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false", since="2.0", group="validation")
private static final String EMPTY_VALUES_AS_NULL_PARAM_NAME = "javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL";
// our own, cached key
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/convert/EnumConverter.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/convert/EnumConverter.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/convert/EnumConverter.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/convert/EnumConverter.java Thu Oct 6 19:09:59 2011
@@ -44,7 +44,7 @@ public class EnumConverter implements Co
*
* See MYFACES-2739 for details.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.ENUM_CONVERTER_ALLOW_STRING_PASSTROUGH", since="2.0.1", expectedValues="true,false",defaultValue="false")
+ @JSFWebConfigParam(name="org.apache.myfaces.ENUM_CONVERTER_ALLOW_STRING_PASSTROUGH", since="2.0.1", expectedValues="true,false",defaultValue="false", group="validation")
private static final String ALLOW_STRING_PASSTROUGH = "org.apache.myfaces.ENUM_CONVERTER_ALLOW_STRING_PASSTROUGH";
// TODO: Find a valid generic usage -= Simon Lessard =-
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/BeanValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/BeanValidator.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/BeanValidator.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/validator/BeanValidator.java Thu Oct 6 19:09:59 2011
@@ -93,7 +93,7 @@ public class BeanValidator implements Va
* If this init parameter is present, no Bean Validators should be added to an UIInput by default.
* Explicitly adding a BeanValidator to an UIInput is possible though.
*/
- @JSFWebConfigParam(defaultValue="true", expectedValues="true, false", since="2.0")
+ @JSFWebConfigParam(defaultValue="true", expectedValues="true, false", since="2.0", group="validation")
public static final String DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME = "javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR";
/**
Modified: myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java (original)
+++ myfaces/core/branches/2.0.x/api/src/main/java/javax/faces/webapp/PreJsf2ExceptionHandlerFactory.java Thu Oct 6 19:09:59 2011
@@ -95,7 +95,7 @@ public class PreJsf2ExceptionHandlerFact
* </ul>
* Furthermore, the init parameter only works when using the PreJsf2ExceptionHandlerFactory.
*/
- @JSFWebConfigParam(since="1.2.4",desc="Deprecated: use JSF 2.0 ExceptionHandler")
+ @JSFWebConfigParam(since="1.2.4",desc="Deprecated: use JSF 2.0 ExceptionHandler", deprecated=true)
private static final String ERROR_HANDLER_PARAMETER = "org.apache.myfaces.ERROR_HANDLER";
private Queue<ExceptionQueuedEvent> handled;
Modified: myfaces/core/branches/2.0.x/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/pom.xml?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/pom.xml (original)
+++ myfaces/core/branches/2.0.x/impl/pom.xml Thu Oct 6 19:09:59 2011
@@ -72,6 +72,23 @@
</execution>
<execution>
+ <id>makeWebConfigParamsLogger</id>
+ <configuration>
+ <templateFile>WebConfigParamsLogger.vm</templateFile>
+ <outputDirectory>${project.build.directory}/generated-sources/myfaces-builder-plugin</outputDirectory>
+ <xmlFile>org/apache/myfaces/webapp/WebConfigParamsLogger.java</xmlFile>
+ <modelIds>
+ <modelId>myfaces-api</modelId>
+ <modelId>myfaces-impl</modelId>
+ <modelId>myfaces-impl-shared</modelId>
+ </modelIds>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
+
+ <execution>
<id>makefacesconfig</id>
<configuration>
<templateFile>faces-config20.vm</templateFile>
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java Thu Oct 6 19:09:59 2011
@@ -134,7 +134,7 @@ public class ApplicationImpl extends App
/**
* Set the default timezone as system timezone when a converter extending from DateTimeConverter is created.
*/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true, false", since="2.0")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false", since="2.0", group="validation")
public final static String DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
= "javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE";
@@ -151,7 +151,7 @@ public class ApplicationImpl extends App
* should be loaded as soon as they are added to the current application instance or instead
* loaded in a lazy way.
*/
- @JSFWebConfigParam(defaultValue="true",since="2.0")
+ @JSFWebConfigParam(defaultValue="true",since="2.0",tags="performance")
private static final String LAZY_LOAD_CONFIG_OBJECTS_PARAM_NAME = "org.apache.myfaces.LAZY_LOAD_CONFIG_OBJECTS";
private static final boolean LAZY_LOAD_CONFIG_OBJECTS_DEFAULT_VALUE = true;
private Boolean _lazyLoadConfigObjects = null;
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/el/unified/ResolverBuilderBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/el/unified/ResolverBuilderBase.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/el/unified/ResolverBuilderBase.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/el/unified/ResolverBuilderBase.java Thu Oct 6 19:09:59 2011
@@ -50,7 +50,7 @@ public class ResolverBuilderBase
* this param override the default ordering described by JSF spec section 5.
* </p>
*/
- @JSFWebConfigParam(since = "1.2.10, 2.0.2",
+ @JSFWebConfigParam(since = "1.2.10, 2.0.2", group="EL",
desc = "The Class of an Comparator<ELResolver> implementation.")
public static final String EL_RESOLVER_COMPARATOR = "org.apache.myfaces.EL_RESOLVER_COMPARATOR";
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java Thu Oct 6 19:09:59 2011
@@ -68,11 +68,11 @@ public class DefaultRestoreViewSupport i
//private final Log log = LogFactory.getLog(DefaultRestoreViewSupport.class);
private final Logger log = Logger.getLogger(DefaultRestoreViewSupport.class.getName());
- @JSFWebConfigParam(defaultValue = "500", since = "2.0.2")
+ @JSFWebConfigParam(defaultValue = "500", since = "2.0.2", group="viewhandler", tags="performance", classType="java.lang.Integer")
private static final String CHECKED_VIEWID_CACHE_SIZE_ATTRIBUTE = "org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE";
private static final int CHECKED_VIEWID_CACHE_DEFAULT_SIZE = 500;
- @JSFWebConfigParam(defaultValue = "true", since = "2.0.2")
+ @JSFWebConfigParam(defaultValue = "true", since = "2.0.2", group="viewhandler", expectedValues="true,false", tags="performance")
private static final String CHECKED_VIEWID_CACHE_ENABLED_ATTRIBUTE = "org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED";
private static final boolean CHECKED_VIEWID_CACHE_ENABLED_DEFAULT = true;
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/ServerSideStateCacheImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/ServerSideStateCacheImpl.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/ServerSideStateCacheImpl.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/ServerSideStateCacheImpl.java Thu Oct 6 19:09:59 2011
@@ -69,7 +69,7 @@ class ServerSideStateCacheImpl extends S
* </p>
*
*/
- @JSFWebConfigParam(defaultValue="20",since="1.1")
+ @JSFWebConfigParam(defaultValue="20",since="1.1", classType="java.lang.Integer", group="state", tags="performance")
private static final String NUMBER_OF_VIEWS_IN_SESSION_PARAM = "org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION";
/**
@@ -82,7 +82,7 @@ class ServerSideStateCacheImpl extends S
* store more sessions org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION. This feature becomes useful for multi-window applications.
* where without this feature a window can swallow all view slots so the other ones will throw ViewExpiredException.</p>
*/
- @JSFWebConfigParam(since="2.0.6")
+ @JSFWebConfigParam(since="2.0.6", classType="java.lang.Integer", group="state", tags="performance")
private static final String NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_PARAM = "org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION";
/**
@@ -98,7 +98,7 @@ class ServerSideStateCacheImpl extends S
* If <code>false</code> the state will not be serialized to a byte stream.
* </p>
*/
- @JSFWebConfigParam(defaultValue="true",since="1.1")
+ @JSFWebConfigParam(defaultValue="true",since="1.1", expectedValues="true,false", group="state", tags="performance")
private static final String SERIALIZE_STATE_IN_SESSION_PARAM = "org.apache.myfaces.SERIALIZE_STATE_IN_SESSION";
/**
@@ -108,7 +108,7 @@ class ServerSideStateCacheImpl extends S
* If <code>true</code> (default) the serialized state will be compressed before it is written to the session.
* If <code>false</code> the state will not be compressed.
*/
- @JSFWebConfigParam(defaultValue="true",since="1.1")
+ @JSFWebConfigParam(defaultValue="true",since="1.1", expectedValues="true,false", group="state", tags="performance")
private static final String COMPRESS_SERVER_STATE_PARAM = "org.apache.myfaces.COMPRESS_STATE_IN_SESSION";
/**
@@ -144,7 +144,7 @@ class ServerSideStateCacheImpl extends S
* </ul>
*
*/
- @JSFWebConfigParam(defaultValue="off", expectedValues="off, no, hard-soft, soft, soft-weak, weak", since="1.2.5")
+ @JSFWebConfigParam(defaultValue="off", expectedValues="off, no, hard-soft, soft, soft-weak, weak", since="1.2.5", group="state", tags="performance")
private static final String CACHE_OLD_VIEWS_IN_SESSION_MODE = "org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE";
/**
@@ -170,7 +170,7 @@ class ServerSideStateCacheImpl extends S
* Only applicable if state saving method is "server" (= default).
* The default value is false.</p>
*/
- @JSFWebConfigParam(since="2.0.6", defaultValue="false", expectedValues="true, false")
+ @JSFWebConfigParam(since="2.0.6", defaultValue="false", expectedValues="true, false", group="state")
private static final String USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION = "org.apache.myfaces.USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION";
private static final int UNCOMPRESSED_FLAG = 0;
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java Thu Oct 6 19:09:59 2011
@@ -63,7 +63,7 @@ public class HtmlResponseStateManager ex
* it is set to true, to keep aligned with the Reference Implementation (RI).
* </p>
*/
- @JSFWebConfigParam(since="2.0.6", expectedValues="true, false", defaultValue="true")
+ @JSFWebConfigParam(since="2.0.6", expectedValues="true, false", defaultValue="true", group="state")
public static final String INIT_PARAM_HANDLE_STATE_CACHING_MECHANICS = "org.apache.myfaces.HANDLE_STATE_CACHING_MECHANICS";
private Boolean _handleStateCachingMechanics;
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/resource/InternalClassLoaderResourceLoader.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/resource/InternalClassLoaderResourceLoader.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/resource/InternalClassLoaderResourceLoader.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/resource/InternalClassLoaderResourceLoader.java Thu Oct 6 19:09:59 2011
@@ -44,7 +44,7 @@ public class InternalClassLoaderResource
* all in just one file, to preserve line numbers and make javascript
* debugging of the default jsf javascript file more simple.
*/
- @JSFWebConfigParam(since="2.0.1",defaultValue="false",expectedValues="true,false")
+ @JSFWebConfigParam(since="2.0.1",defaultValue="false",expectedValues="true,false", group="render")
public static final String USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS = "org.apache.myfaces.USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS";
private final boolean _useMultipleJsFilesForJsfUncompressedJs;
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/ViewDeclarationLanguageFactoryImpl.java Thu Oct 6 19:09:59 2011
@@ -44,7 +44,7 @@ public class ViewDeclarationLanguageFact
/**
* Disable facelets VDL from the current application project.
*/
- @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true,false")
+ @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true,false", group="viewhandler")
public static final String PARAM_DISABLE_JSF_FACELET = "javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER";
private static final String FACELETS_1_VIEW_HANDLER = "com.sun.facelets.FaceletViewHandler";
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/DefaultFaceletsStateManagementStrategy.java Thu Oct 6 19:09:59 2011
@@ -123,7 +123,7 @@ public class DefaultFaceletsStateManagem
*
* This param is just provided to preserve backwards behavior.
*/
- @JSFWebConfigParam(since="2.0.8, 2.1.2", defaultValue="true", expectedValues="true, false")
+ @JSFWebConfigParam(since="2.0.8, 2.1.2", defaultValue="true", expectedValues="true, false", group="state", tags="performance")
public static final String SAVE_STATE_WITH_VISIT_TREE_ON_PSS = "org.apache.myfaces.SAVE_STATE_WITH_VISIT_TREE_ON_PSS";
private static final String SKIP_ITERATION_HINT = "javax.faces.visit.SKIP_ITERATION";
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java Thu Oct 6 19:09:59 2011
@@ -157,7 +157,7 @@ public class FaceletViewDeclarationLangu
* Define the default buffer size value passed to ExternalContext.setResponseBufferResponse() and in a
* servlet environment to HttpServletResponse.setBufferSize().
*/
- @JSFWebConfigParam(since="2.0",
+ @JSFWebConfigParam(since="2.0", alias="facelets.BUFFER_SIZE", classType="java.lang.Integer", tags="performance",
desc="Define the default buffer size value passed to ExternalContext.setResponseBufferResponse() and in a servlet environment to HttpServletResponse.setBufferSize()")
public final static String PARAM_BUFFER_SIZE = "javax.faces.FACELETS_BUFFER_SIZE";
@@ -165,7 +165,7 @@ public class FaceletViewDeclarationLangu
* Define the default buffer size value passed to ExternalContext.setResponseBufferResponse() and in a
* servlet environment to HttpServletResponse.setBufferSize().
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", deprecated=true, classType="java.lang.Integer")
private final static String PARAM_BUFFER_SIZE_DEPRECATED = "facelets.BUFFER_SIZE";
private final static String[] PARAMS_BUFFER_SIZE = {PARAM_BUFFER_SIZE, PARAM_BUFFER_SIZE_DEPRECATED};
@@ -176,14 +176,14 @@ public class FaceletViewDeclarationLangu
* Set of class names, separated by ';', implementing TagDecorator interface, used to transform
* a view definition in a facelet abstract syntax tree, that is used later to generate a component tree.
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", alias="facelets.DECORATORS")
public final static String PARAM_DECORATORS = "javax.faces.FACELETS_DECORATORS";
/**
* Set of class names, separated by ';', implementing TagDecorator interface, used to transform
* a view definition in a facelet abstract syntax tree, that is used later to generate a component tree.
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", deprecated=true)
private final static String PARAM_DECORATORS_DEPRECATED = "facelets.DECORATORS";
private final static String[] PARAMS_DECORATORS = {PARAM_DECORATORS, PARAM_DECORATORS_DEPRECATED};
@@ -197,13 +197,15 @@ public class FaceletViewDeclarationLangu
/**
* Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.
*/
- @JSFWebConfigParam(since="2.0", desc="Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.")
+ @JSFWebConfigParam(since="2.0", desc="Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.",
+ alias="facelets.LIBRARIES")
public final static String PARAM_LIBRARIES = "javax.faces.FACELETS_LIBRARIES";
/**
* Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.
*/
- @JSFWebConfigParam(since="2.0", desc="Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.")
+ @JSFWebConfigParam(since="2.0", desc="Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.",
+ deprecated=true)
private final static String PARAM_LIBRARIES_DEPRECATED = "facelets.LIBRARIES";
private final static String[] PARAMS_LIBRARIES = {PARAM_LIBRARIES, PARAM_LIBRARIES_DEPRECATED};
@@ -213,7 +215,7 @@ public class FaceletViewDeclarationLangu
*
* <p>By default is infinite (no active).</p>
*/
- @JSFWebConfigParam(since="2.0", defaultValue="-1")
+ @JSFWebConfigParam(since="2.0", defaultValue="-1", alias="facelets.REFRESH_PERIOD", classType="java.lang.Long", tags="performance")
public final static String PARAM_REFRESH_PERIOD = "javax.faces.FACELETS_REFRESH_PERIOD";
/**
@@ -221,7 +223,7 @@ public class FaceletViewDeclarationLangu
*
* <p>By default is infinite (no active).</p>
*/
- @JSFWebConfigParam(since="2.0", defaultValue="-1")
+ @JSFWebConfigParam(since="2.0", defaultValue="-1", deprecated=true)
private final static String PARAM_REFRESH_PERIOD_DEPRECATED = "facelets.REFRESH_PERIOD";
private final static String[] PARAMS_REFRESH_PERIOD = {PARAM_REFRESH_PERIOD, PARAM_REFRESH_PERIOD_DEPRECATED};
@@ -229,13 +231,13 @@ public class FaceletViewDeclarationLangu
/**
* Class implementing ResourceResolver interface used to locate facelet resources.
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", alias="facelets.RESOURCE_RESOLVER")
public final static String PARAM_RESOURCE_RESOLVER = "javax.faces.FACELETS_RESOURCE_RESOLVER";
/**
* Class implementing ResourceResolver interface used to locate facelet resources.
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", deprecated=true)
private final static String PARAM_RESOURCE_RESOLVER_DEPRECATED = "facelets.RESOURCE_RESOLVER";
private final static String[] PARAMS_RESOURCE_RESOLVER = {PARAM_RESOURCE_RESOLVER, PARAM_RESOURCE_RESOLVER_DEPRECATED};
@@ -243,13 +245,13 @@ public class FaceletViewDeclarationLangu
/**
* Skip comments found on a facelet file.
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", alias="facelets.SKIP_COMMENTS")
public final static String PARAM_SKIP_COMMENTS = "javax.faces.FACELETS_SKIP_COMMENTS";
/**
* Skip comments found on a facelet file.
*/
- @JSFWebConfigParam(since="2.0")
+ @JSFWebConfigParam(since="2.0", deprecated=true)
private final static String PARAM_SKIP_COMMENTS_DEPRECATED = "facelets.SKIP_COMMENTS";
private final static String[] PARAMS_SKIP_COMMENTS = {PARAM_SKIP_COMMENTS, PARAM_SKIP_COMMENTS_DEPRECATED};
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java Thu Oct 6 19:09:59 2011
@@ -55,7 +55,7 @@ public class FaceletCompositionContextIm
* </ul>
*
*/
- @JSFWebConfigParam(since="2.0.8", defaultValue="noCache", expectedValues="noCache, strict, allowCset, always")
+ @JSFWebConfigParam(since="2.0.8", defaultValue="noCache", expectedValues="noCache, strict, allowCset, always", group="EL", tags="performance")
public static final String INIT_PARAM_CACHE_EL_EXPRESSIONS = "org.apache.myfaces.CACHE_EL_EXPRESSIONS";
/**
Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java Thu Oct 6 19:09:59 2011
@@ -72,7 +72,7 @@ public abstract class AbstractFacesIniti
/**
* This parameter specifies the ExpressionFactory implementation to use.
*/
- @JSFWebConfigParam(since="1.2.7")
+ @JSFWebConfigParam(since="1.2.7", group="EL")
protected static final String EXPRESSION_FACTORY = "org.apache.myfaces.EXPRESSION_FACTORY";
/**
@@ -80,6 +80,16 @@ public abstract class AbstractFacesIniti
*/
@JSFWebConfigParam(since="2.0.3", defaultValue="false")
protected static final String INITIALIZE_ALWAYS_STANDALONE = "org.apache.myfaces.INITIALIZE_ALWAYS_STANDALONE";
+
+ /**
+ * Indicate if log all web config params should be done before initialize the webapp.
+ * <p>
+ * If is set in "auto" mode, web config params are only logged on "Development" and "Production" project stages.
+ * </p>
+ */
+ @JSFWebConfigParam(expectedValues="true, auto, false", defaultValue="auto")
+ public static final String INIT_PARAM_LOG_WEB_CONTEXT_PARAMS = "org.apache.myfaces.LOG_WEB_CONTEXT_PARAMS";
+ public static final String INIT_PARAM_LOG_WEB_CONTEXT_PARAMS_DEFAULT ="auto";
/**
* Performs all necessary initialization tasks like configuring this JSF
@@ -129,15 +139,20 @@ public abstract class AbstractFacesIniti
StateUtils.initSecret(servletContext);
}
- if (log.isLoggable(Level.INFO)) {
- log.info("ServletContext '" + servletContext.getRealPath("/") + "' initialized.");
- }
-
// initialize eager managed beans
_createEagerBeans(facesContext);
_dispatchApplicationEvent(servletContext, PostConstructApplicationEvent.class);
-
+
+ if ( (facesContext.isProjectStage(ProjectStage.Development) ||
+ facesContext.isProjectStage(ProjectStage.Production)) &&
+ log.isLoggable(Level.INFO))
+ {
+ log.info("ServletContext '" + servletContext.getRealPath("/") + "' initialized.");
+ }
+
+ WebConfigParamsLogger.logWebContextParams(facesContext);
+
// print out a very prominent log message if the project stage is != Production
if (!facesContext.isProjectStage(ProjectStage.Production))
{
Added: myfaces/core/branches/2.0.x/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm?rev=1179773&view=auto
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm (added)
+++ myfaces/core/branches/2.0.x/impl/src/main/resources/META-INF/WebConfigParamsLogger.vm Thu Oct 6 19:09:59 2011
@@ -0,0 +1,181 @@
+// WARNING: This file was automatically generated. Do not edit it directly,
+// or you will lose your changes.
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.webapp;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.faces.application.ProjectStage;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.shared.config.MyfacesConfig;
+import org.apache.myfaces.shared.util.StringUtils;
+import org.apache.myfaces.shared.util.WebConfigParamUtils;
+
+public class WebConfigParamsLogger
+{
+ private static final Logger log = Logger.getLogger(WebConfigParamsLogger.class.getName());
+
+ public static void logWebContextParams(FacesContext facesContext)
+ {
+ String logCommand = WebConfigParamUtils.getStringInitParameter(
+ facesContext.getExternalContext(),
+ AbstractFacesInitializer.INIT_PARAM_LOG_WEB_CONTEXT_PARAMS, AbstractFacesInitializer.INIT_PARAM_LOG_WEB_CONTEXT_PARAMS_DEFAULT);
+
+ if ( logCommand.equals("false") ||
+ (logCommand.equals("auto") && !facesContext.isProjectStage(ProjectStage.Development) && !facesContext.isProjectStage(ProjectStage.Production) )
+ )
+ {
+ //No log if is disabled or is in auto mode and project stage is UnitTest or SystemTest
+ return;
+ }
+
+ MyfacesConfig myfacesConfig = MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());
+
+ if (myfacesConfig.isTomahawkAvailable())
+ {
+ if(myfacesConfig.isMyfacesImplAvailable())
+ {
+ if(log.isLoggable(Level.INFO))
+ {
+ log.info("Starting up Tomahawk on the RI-JSF-Implementation.");
+ }
+ }
+
+ if(myfacesConfig.isRiImplAvailable())
+ {
+ if(log.isLoggable(Level.INFO))
+ {
+ log.info("Starting up Tomahawk on the MyFaces-JSF-Implementation");
+ }
+ }
+ }
+ else
+ {
+ if (log.isLoggable(Level.INFO))
+ {
+ log.info("Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.");
+ }
+ }
+
+ if(myfacesConfig.isRiImplAvailable() && myfacesConfig.isMyfacesImplAvailable())
+ {
+ log.severe("Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.");
+ }
+
+
+## ----------------------------- PROPERTY MACROS -----------------------------
+##
+## -------------------------------
+## writePropertyCheck
+## -------------------------------
+##
+#macro (writePropertyCheck $webConfigParam)
+ paramValue = facesContext.getExternalContext().getInitParameter("$webConfigParam.name");
+ if (paramValue == null)
+ {
+ log.info("No context init parameter '$webConfigParam.name' found#if($webConfigParam.defaultValue), using default value '$webConfigParam.defaultValue'#end.");
+ }
+#if (!$webConfigParam.isDeprecated())
+#if ($webConfigParam.expectedValues)
+ else
+ {
+ boolean found = false;
+ String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("$webConfigParam.expectedValues",','));
+ for (int i = 0; i < expectedValues.length; i++)
+ {
+#if ($webConfigParam.isIgnoreUpperLowerCase())
+ if (paramValue.equalsIgnoreCase(expectedValues[i]))
+#else
+ if (paramValue.equals(expectedValues[i]))
+#end
+ {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ if (log.isLoggable(Level.WARNING))
+ {
+ log.warning("Wrong value in context init parameter '$webConfigParam.name' (='" + paramValue + "'), using default value #if($webConfigParam.defaultValue)'$webConfigParam.defaultValue'#else'null'#end");
+ }
+ }
+ }
+#elseif ($webConfigParam.classType)
+ else
+ {
+ try
+ {
+ ${webConfigParam.classType}.valueOf(paramValue);
+ }
+ catch(Exception e)
+ {
+ if (log.isLoggable(Level.WARNING))
+ {
+ log.warning("Wrong value in context init parameter '$webConfigParam.name' (='" + paramValue + "'), using default value #if($webConfigParam.defaultValue)'$webConfigParam.defaultValue'#else'null'#end");
+ }
+ }
+ }
+#end
+#end
+#end
+##
+## ----------------------------- END PROPERTY MACROS -------------------------
+##
+
+ if (log.isLoggable(Level.INFO))
+ {
+ log.info("Scanning for context init parameters not defined. It is not necessary to define them all into your web.xml, " +
+ "they are just provided here for informative purposes. To disable this messages set " +
+ AbstractFacesInitializer.INIT_PARAM_LOG_WEB_CONTEXT_PARAMS + " config param to 'false'");
+ String paramValue = null;
+#set ($webConfigList = ${model.getWebConfigs()})
+#foreach( $webConfig in $webConfigList )
+#if ($modelIds.contains($webConfig.modelId))
+#set ($webConfigParamList = ${webConfig.getWebConfigParametersList()})
+#foreach( $webConfigParam in $webConfigParamList )
+#if (not $webConfigParam.containsTag('tomahawk'))
+
+#writePropertyCheck($webConfigParam)
+#end
+#end
+#end
+#end
+ }
+##
+ if (log.isLoggable(Level.INFO) && myfacesConfig.isTomahawkAvailable())
+ {
+ String paramValue = null;
+#foreach( $webConfig in $webConfigList )
+#if ($modelIds.contains($webConfig.modelId))
+#set ($webConfigParamList = ${webConfig.getWebConfigParametersList()})
+#foreach( $webConfigParam in $webConfigParamList )
+#if ($webConfigParam.containsTag('tomahawk'))
+
+#writePropertyCheck($webConfigParam)
+#end
+#end
+#end
+#end
+ }
+ }
+}
Modified: myfaces/core/branches/2.0.x/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/pom.xml?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/pom.xml (original)
+++ myfaces/core/branches/2.0.x/pom.xml Thu Oct 6 19:09:59 2011
@@ -131,7 +131,7 @@
<plugin>
<groupId>org.apache.myfaces.buildtools</groupId>
<artifactId>myfaces-builder-plugin</artifactId>
- <version>1.0.8</version>
+ <version>1.0.10-SNAPSHOT</version>
</plugin>
<plugin>
@@ -414,7 +414,7 @@
<dependency>
<groupId>org.apache.myfaces.buildtools</groupId>
<artifactId>myfaces-builder-annotations</artifactId>
- <version>1.0.7</version>
+ <version>1.0.9-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Modified: myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java (original)
+++ myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/application/DefaultViewHandlerSupport.java Thu Oct 6 19:09:59 2011
@@ -55,7 +55,7 @@ public class DefaultViewHandlerSupport i
/**
* Controls the size of the cache used to "remember" if a view exists or not.
*/
- @JSFWebConfigParam(defaultValue = "500", since = "2.0.2",
+ @JSFWebConfigParam(defaultValue = "500", since = "2.0.2", group="viewhandler", tags="performance", classType="java.lang.Integer",
desc="Controls the size of the cache used to 'remember' if a view exists or not.")
private static final String CHECKED_VIEWID_CACHE_SIZE_ATTRIBUTE = "org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE";
private static final int CHECKED_VIEWID_CACHE_DEFAULT_SIZE = 500;
@@ -64,7 +64,7 @@ public class DefaultViewHandlerSupport i
* Enable or disable a cache used to "remember" if a view exists or not and reduce the impact of
* sucesive calls to ExternalContext.getResource().
*/
- @JSFWebConfigParam(defaultValue = "true", since = "2.0.2",
+ @JSFWebConfigParam(defaultValue = "true", since = "2.0.2", expectedValues="true, false", group="viewhandler", tags="performance",
desc="Enable or disable a cache used to 'remember' if a view exists or not and reduce the impact of sucesive calls to ExternalContext.getResource().")
private static final String CHECKED_VIEWID_CACHE_ENABLED_ATTRIBUTE = "org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED";
private static final boolean CHECKED_VIEWID_CACHE_ENABLED_DEFAULT = true;
Modified: myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java (original)
+++ myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java Thu Oct 6 19:09:59 2011
@@ -50,6 +50,11 @@ public class MyfacesConfig
private static final String APPLICATION_MAP_PARAM_NAME = MyfacesConfig.class.getName();
+ /**
+ * Set the virtual path used to serve resources using tomahawk addResource API. Note ExtensionsFilter should
+ * be able to receive request on the prefix used here.
+ */
+ @JSFWebConfigParam(tags="tomahawk")
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH = "org.apache.myfaces.RESOURCE_VIRTUAL_PATH";
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT = "/faces/myFacesExtensionResource";
@@ -58,7 +63,8 @@ public class MyfacesConfig
* i.e. additional line separators and whitespace will be written, that do not
* influence the HTML code. Default: "true"
*/
- @JSFWebConfigParam(defaultValue="true", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1",
+ ignoreUpperLowerCase=true, group="render")
private static final String INIT_PARAM_PRETTY_HTML = "org.apache.myfaces.PRETTY_HTML";
private static final boolean INIT_PARAM_PRETTY_HTML_DEFAULT = true;
@@ -70,14 +76,16 @@ public class MyfacesConfig
* added as url parameters.
* Default: "true"
*/
- @JSFWebConfigParam(defaultValue="true", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1",
+ ignoreUpperLowerCase=true, group="render")
private static final String INIT_PARAM_ALLOW_JAVASCRIPT = "org.apache.myfaces.ALLOW_JAVASCRIPT";
private static final boolean INIT_PARAM_ALLOW_JAVASCRIPT_DEFAULT = true;
/**
* Deprecated: tomahawk specific param to detect javascript, but it is no longer valid anymore.
*/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
+ ignoreUpperLowerCase=true, deprecated=true, tags="tomahawk", group="render")
private static final String INIT_PARAM_DETECT_JAVASCRIPT = "org.apache.myfaces.DETECT_JAVASCRIPT";
private static final boolean INIT_PARAM_DETECT_JAVASCRIPT_DEFAULT = false;
@@ -88,7 +96,8 @@ public class MyfacesConfig
* if you trigger a link or button action that stays on the same page.
* Default: "false"
*/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
+ ignoreUpperLowerCase=true, tags="tomahawk")
private static final String INIT_PARAM_AUTO_SCROLL = "org.apache.myfaces.AUTO_SCROLL";
private static final boolean INIT_PARAM_AUTO_SCROLL_DEFAULT = false;
@@ -103,7 +112,7 @@ public class MyfacesConfig
* gain performance.
*/
@JSFWebConfigParam(defaultValue="org.apache.myfaces. renderkit.html.util. DefaultAddResource",since="1.1",
- desc="Tomahawk specific: Indicate the class responsible to place scripts and css using tomahawk AddResource API")
+ desc="Tomahawk specific: Indicate the class responsible to place scripts and css using tomahawk AddResource API", tags="tomahawk")
private static final String INIT_PARAM_ADD_RESOURCE_CLASS = "org.apache.myfaces.ADD_RESOURCE_CLASS";
private static final String INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT = "org.apache.myfaces.renderkit.html.util.DefaultAddResource";
@@ -119,15 +128,15 @@ public class MyfacesConfig
*
* In tomahawk for JSF 2.0 since version 1.1.11, this param is set by default to false, otherwise is true.
*/
- @JSFWebConfigParam(defaultValue="for JSF 2.0 since 1.1.11 false, otherwise true", expectedValues="true,false",since="1.1",
- desc="Tomahawk specific: This parameter will check for a properly configured Extensions-Filter if it is needed by the web-app.")
+ @JSFWebConfigParam(defaultValue="for JSF 2.0 since 1.1.11 false, otherwise true", expectedValues="true, false, on, off, yes, no",since="1.1", ignoreUpperLowerCase=true,
+ desc="Tomahawk specific: This parameter will check for a properly configured Extensions-Filter if it is needed by the web-app.", tags="tomahawk")
private static final String INIT_CHECK_EXTENSIONS_FILTER = "org.apache.myfaces.CHECK_EXTENSIONS_FILTER";
private static final boolean INIT_CHECK_EXTENSIONS_FILTER_DEFAULT = false;
/**
* Tomahawk specific: Interpret "readonly" property as "disable" for select components like t:selectOneRow.
*/
- @JSFWebConfigParam(defaultValue="true", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1", ignoreUpperLowerCase=true, tags="tomahawk", group="render")
private static final String INIT_READONLY_AS_DISABLED_FOR_SELECT = "org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS";
private static final boolean INIT_READONLY_AS_DISABLED_FOR_SELECT_DEFAULT = true;
@@ -135,14 +144,15 @@ public class MyfacesConfig
* Set the time in seconds that check for updates of web.xml and faces-config descriptors and refresh the configuration.
* This param is valid only if project stage is not production. Set this param to 0 disable this feature.
*/
- @JSFWebConfigParam(defaultValue="2",since="1.1")
+ @JSFWebConfigParam(defaultValue="2",since="1.1", classType="java.lang.Long")
public static final String INIT_PARAM_CONFIG_REFRESH_PERIOD = "org.apache.myfaces.CONFIG_REFRESH_PERIOD";
public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT = 2;
/**
* Set the view state using a javascript function instead a hidden input field.
*/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
+ ignoreUpperLowerCase=true, deprecated=true, group="state")
private static final String INIT_PARAM_VIEWSTATE_JAVASCRIPT = "org.apache.myfaces.VIEWSTATE_JAVASCRIPT";
private static final boolean INIT_PARAM_VIEWSTATE_JAVASCRIPT_DEFAULT = false;
@@ -159,7 +169,8 @@ public class MyfacesConfig
* <li>false - to omit rendering of the id attribute (which is only needed for very special AJAX/Javascript components)</li></ul>
* Default value is: true (for backwards compatibility and JSF 1.2 compliancy)
*/
- @JSFWebConfigParam(defaultValue="true", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1",
+ ignoreUpperLowerCase=true, group="state")
private static final String INIT_PARAM_RENDER_VIEWSTATE_ID = "org.apache.myfaces.RENDER_VIEWSTATE_ID";
private static final boolean INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT = true;
@@ -178,7 +189,8 @@ public class MyfacesConfig
* See: <a href="http://issues.apache.org/jira/browse/MYFACES-1774">Jira: MYFACES-1774</a>
* </p>
*/
- @JSFWebConfigParam(defaultValue="true", expectedValues="true,false",since="1.1.6")
+ @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1.6",
+ ignoreUpperLowerCase=true, group="render")
private static final String INIT_PARAM_STRICT_XHTML_LINKS = "org.apache.myfaces.STRICT_XHTML_LINKS";
private static final boolean INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT = true;
@@ -188,7 +200,8 @@ public class MyfacesConfig
* because jsf ri does not render javascript on onclick method for button,
* so myfaces should do this.
*/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true,false",since="1.2.3")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.2.3",
+ ignoreUpperLowerCase=true, group="render")
private static final String INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON = "org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON";
private static final boolean INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT= false;
@@ -198,7 +211,8 @@ public class MyfacesConfig
* automatically to ensure consistency. This feature is required to support Windows Mobile 6, because in this environment,
* document.createElement() and form.appendChild() javascript methods are not supported.
*/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true,false",since="1.2.9")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.2.9",
+ ignoreUpperLowerCase=true, group="render")
private static final String INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS = "org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS";
private static final boolean INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS_DEFAULT= false;
@@ -206,7 +220,8 @@ public class MyfacesConfig
* Add a code that save the form before submit using a
* link (call to window.external.AutoCompleteSaveForm(form) ). It's a bug on IE.
*/
- @JSFWebConfigParam(defaultValue="false", expectedValues="true,false",since="1.1")
+ @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
+ ignoreUpperLowerCase=true, group="render")
private static final String INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE = "org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE";
private static final boolean INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE_DEFAULT = false;
@@ -230,7 +245,8 @@ public class MyfacesConfig
* c:choose and ui:include with src=ELExpression is used on the page and if that so, mark the view
* to be refreshed.</p>
*/
- @JSFWebConfigParam(since="2.0", defaultValue="auto", expectedValues="true,false,auto")
+ @JSFWebConfigParam(since="2.0", defaultValue="auto", expectedValues="true,false,auto", tags="performance",
+ ignoreUpperLowerCase=true, group="state")
public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS = "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS";
public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT = "auto";
@@ -243,7 +259,8 @@ public class MyfacesConfig
* c:choose and ui:include with src=ELExpression are marked to be restored fully, so state
* is preserved between request.</p>
*/
- @JSFWebConfigParam(since="2.0", defaultValue="false")
+ @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false, on, off, yes, no", tags="performance",
+ ignoreUpperLowerCase=true, group="state")
public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE = "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE";
public final static boolean INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT = false;
@@ -251,21 +268,23 @@ public class MyfacesConfig
* If set to <code>true</code>, tag library XML files and faces config XML files using schema
* will be validated during application start up
*/
- @JSFWebConfigParam(since="2.0", expectedValues="true,false")
+ @JSFWebConfigParam(since="2.0", expectedValues="true, false, on, off, yes, no", ignoreUpperLowerCase=true)
public final static String INIT_PARAM_VALIDATE_XML = "org.apache.myfaces.VALIDATE_XML";
public final static boolean INIT_PARAM_VALIDATE_XML_DEFAULT = false;
/**
* Wrap content inside script with xml comment to prevent old browsers to display it. By default it is true.
*/
- @JSFWebConfigParam(since="2.0.1", expectedValues="true,false", defaultValue="true")
+ @JSFWebConfigParam(since="2.0.1", expectedValues="true, false, on, off, yes, no", defaultValue="true",
+ ignoreUpperLowerCase=true, group="render")
public final static String INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG = "org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG";
public final static boolean INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT = true;
/**
* If set true, render the form submit script inline, as in myfaces core 1.2 and earlier versions
*/
- @JSFWebConfigParam(since="2.0.2", expectedValues="true,false", defaultValue="false")
+ @JSFWebConfigParam(since="2.0.2", expectedValues="true, false, on, off, yes, no", defaultValue="false",
+ ignoreUpperLowerCase=true, group="render")
public final static String INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE = "org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE";
public final static boolean INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT = false;
@@ -482,7 +501,7 @@ public class MyfacesConfig
myfacesConfig.setCheckExtensionsFilter(getBooleanInitParameter(extCtx, INIT_CHECK_EXTENSIONS_FILTER,
INIT_CHECK_EXTENSIONS_FILTER_DEFAULT));
-
+ /*
if(RI_IMPL_AVAILABLE)
{
if(log.isLoggable(Level.INFO))
@@ -497,20 +516,22 @@ public class MyfacesConfig
{
log.info("Starting up Tomahawk on the MyFaces-JSF-Implementation");
}
- }
+ }*/
}
+ /*
else
{
if (log.isLoggable(Level.INFO))
{
log.info("Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.");
}
- }
+ }*/
+ /*
if(RI_IMPL_AVAILABLE && MYFACES_IMPL_AVAILABLE)
{
log.severe("Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.");
- }
+ }*/
return myfacesConfig;
}
@@ -521,7 +542,7 @@ public class MyfacesConfig
String strValue = externalContext.getInitParameter(paramName);
if (strValue == null)
{
- if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" + paramName + "' found, using default value " + defaultValue);
+ //if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" + paramName + "' found, using default value " + defaultValue);
return defaultValue;
}
else if (strValue.equalsIgnoreCase("true") || strValue.equalsIgnoreCase("on") || strValue.equalsIgnoreCase("yes"))
@@ -534,7 +555,7 @@ public class MyfacesConfig
}
else
{
- if (log.isLoggable(Level.WARNING)) log.warning("Wrong context init parameter '" + paramName + "' (='" + strValue + "'), using default value " + defaultValue);
+ //if (log.isLoggable(Level.WARNING)) log.warning("Wrong context init parameter '" + paramName + "' (='" + strValue + "'), using default value " + defaultValue);
return defaultValue;
}
}
@@ -546,7 +567,7 @@ public class MyfacesConfig
String strValue = externalContext.getInitParameter(paramName);
if (strValue == null)
{
- if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" + paramName + "' found, using default value " + defaultValue); //defaultValue==null should not be a problem here
+ //if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" + paramName + "' found, using default value " + defaultValue); //defaultValue==null should not be a problem here
return defaultValue;
}
@@ -559,7 +580,7 @@ public class MyfacesConfig
String strValue = externalContext.getInitParameter(paramName);
if (strValue == null)
{
- if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" +paramName +"' found, using default value " +defaultValue);
+ //if (log.isLoggable(Level.INFO)) log.info("No context init parameter '" +paramName +"' found, using default value " +defaultValue);
return defaultValue;
}
else
@@ -567,7 +588,7 @@ public class MyfacesConfig
try {
return Long.parseLong(strValue);
} catch (NumberFormatException e) {
- if (log.isLoggable(Level.WARNING)) log.warning("Wrong context init parameter '" + paramName + "' (='" + strValue + "'), using default value " + defaultValue);
+ //if (log.isLoggable(Level.WARNING)) log.warning("Wrong context init parameter '" + paramName + "' (='" + strValue + "'), using default value " + defaultValue);
}
return defaultValue;
}
Modified: myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java (original)
+++ myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/BaseResourceHandlerSupport.java Thu Oct 6 19:09:59 2011
@@ -41,7 +41,7 @@ public class BaseResourceHandlerSupport
* Set the max time in miliseconds set on the "Expires" header for a resource rendered by the default ResourceHandler.
* (default to one week in miliseconds or 604800000)
*/
- @JSFWebConfigParam(since="2.0", defaultValue="604800000")
+ @JSFWebConfigParam(since="2.0", defaultValue="604800000", group="resources", tags="performance")
public static final String RESOURCE_MAX_TIME_EXPIRES = "org.apache.myfaces.RESOURCE_MAX_TIME_EXPIRES";
/**
Modified: myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java (original)
+++ myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/resource/ResourceHandlerCache.java Thu Oct 6 19:09:59 2011
@@ -43,7 +43,7 @@ public class ResourceHandlerCache
*
* <p>See org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED for details.</p>
*/
- @JSFWebConfigParam(defaultValue = "500", since = "2.0.2")
+ @JSFWebConfigParam(defaultValue = "500", since = "2.0.2", group="resources", classType="java.lang.Integer", tags="performance")
private static final String RESOURCE_HANDLER_CACHE_SIZE_ATTRIBUTE = "org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE";
private static final int RESOURCE_HANDLER_CACHE_DEFAULT_SIZE = 500;
@@ -51,7 +51,7 @@ public class ResourceHandlerCache
* Enable or disable the cache used to "remember" if a resource handled by the default ResourceHandler exists or not.
*
*/
- @JSFWebConfigParam(defaultValue = "true", since = "2.0.2")
+ @JSFWebConfigParam(defaultValue = "true", since = "2.0.2", group="resources", expectedValues="true,false", tags="performance")
private static final String RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE = "org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED";
private static final boolean RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT = true;
Modified: myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java?rev=1179773&r1=1179772&r2=1179773&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java (original)
+++ myfaces/core/branches/2.0.x/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java Thu Oct 6 19:09:59 2011
@@ -104,7 +104,7 @@ public final class StateUtils {
/**
* Indicate if the view state is encrypted or not. By default, encryption is enabled.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.USE_ENCRYPTION",since="1.1",defaultValue="true",expectedValues="true,false")
+ @JSFWebConfigParam(name="org.apache.myfaces.USE_ENCRYPTION",since="1.1",defaultValue="true",expectedValues="true,false",group="state")
public static final String USE_ENCRYPTION = INIT_PREFIX + "USE_ENCRYPTION";
/**
@@ -113,32 +113,32 @@ public final class StateUtils {
* for instructions on how to configure an application for
* different encryption strengths.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.SECRET",since="1.1")
+ @JSFWebConfigParam(name="org.apache.myfaces.SECRET",since="1.1",group="state")
public static final String INIT_SECRET = INIT_PREFIX + "SECRET";
/**
* Indicate the encryption algorithm used for encrypt the view state.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.ALGORITHM",since="1.1",defaultValue="DES")
+ @JSFWebConfigParam(name="org.apache.myfaces.ALGORITHM",since="1.1",defaultValue="DES",group="state",tags="performance")
public static final String INIT_ALGORITHM = INIT_PREFIX + "ALGORITHM";
/**
* If is set to "false", the secret key used for encryption algorithm is not cached. This is used
* when the returned SecretKey for encryption algorithm is not thread safe.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.SECRET.CACHE",since="1.1")
+ @JSFWebConfigParam(name="org.apache.myfaces.SECRET.CACHE",since="1.1",group="state")
public static final String INIT_SECRET_KEY_CACHE = INIT_SECRET + ".CACHE";
/**
* Defines the initialization vector (Base64 encoded) used for the encryption algorithm
*/
- @JSFWebConfigParam(name="org.apache.myfaces.ALGORITHM.IV",since="1.1")
+ @JSFWebConfigParam(name="org.apache.myfaces.ALGORITHM.IV",since="1.1",group="state")
public static final String INIT_ALGORITHM_IV = INIT_ALGORITHM + ".IV";
/**
* Defines the default mode and padding used for the encryption algorithm
*/
- @JSFWebConfigParam(name="org.apache.myfaces.ALGORITHM.PARAMETERS",since="1.1",defaultValue="ECB/PKCS5Padding")
+ @JSFWebConfigParam(name="org.apache.myfaces.ALGORITHM.PARAMETERS",since="1.1",defaultValue="ECB/PKCS5Padding",group="state")
public static final String INIT_ALGORITHM_PARAM = INIT_ALGORITHM + ".PARAMETERS";
/**
@@ -146,13 +146,13 @@ public final class StateUtils {
* by state manager into a byte array. The expected class must implement
* org.apache.myfaces.shared.util.serial.SerialFactory interface.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.SERIAL_FACTORY", since="1.1")
+ @JSFWebConfigParam(name="org.apache.myfaces.SERIAL_FACTORY", since="1.1",group="state",tags="performance")
public static final String SERIAL_FACTORY = INIT_PREFIX + "SERIAL_FACTORY";
/**
* Indicate if the view state should be compressed before encrypted(optional) and encoded
*/
- @JSFWebConfigParam(name="org.apache.myfaces.COMPRESS_STATE_IN_CLIENT",since="1.1",defaultValue="false",expectedValues="true,false")
+ @JSFWebConfigParam(name="org.apache.myfaces.COMPRESS_STATE_IN_CLIENT",since="1.1",defaultValue="false",expectedValues="true,false",group="state",tags="performance")
public static final String COMPRESS_STATE_IN_CLIENT = INIT_PREFIX + "COMPRESS_STATE_IN_CLIENT";
public static final String DEFAULT_MAC_ALGORITHM = "HmacSHA1";
@@ -161,21 +161,21 @@ public final class StateUtils {
* Indicate the algorithm used to calculate the Message Authentication Code that is
* added to the view state.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.MAC_ALGORITHM",defaultValue="HmacSHA1")
+ @JSFWebConfigParam(name="org.apache.myfaces.MAC_ALGORITHM",defaultValue="HmacSHA1",group="state",tags="performance")
public static final String INIT_MAC_ALGORITHM = "org.apache.myfaces.MAC_ALGORITHM";
/**
* Define the initialization code that are used to initialize the secret key used
* on the Message Authentication Code algorithm
*/
- @JSFWebConfigParam(name="org.apache.myfaces.MAC_SECRET")
+ @JSFWebConfigParam(name="org.apache.myfaces.MAC_SECRET",group="state")
public static final String INIT_MAC_SECRET = "org.apache.myfaces.MAC_SECRET";
/**
* If is set to "false", the secret key used for MAC algorithm is not cached. This is used
* when the returned SecretKey for mac algorithm is not thread safe.
*/
- @JSFWebConfigParam(name="org.apache.myfaces.MAC_SECRET.CACHE")
+ @JSFWebConfigParam(name="org.apache.myfaces.MAC_SECRET.CACHE",group="state")
public static final String INIT_MAC_SECRET_KEY_CACHE = "org.apache.myfaces.MAC_SECRET.CACHE";
/** Utility class, do not instatiate */