org.apache.myfaces.trinidadinternal.config
Class CheckSerializationConfigurator

java.lang.Object
  extended by org.apache.myfaces.trinidad.config.Configurator
      extended by org.apache.myfaces.trinidadinternal.config.CheckSerializationConfigurator

public final class CheckSerializationConfigurator
extends org.apache.myfaces.trinidad.config.Configurator

Configurator that uses both wrapped ExternalContext (for Portlet cases) and wrapped ServletContext and HttpSession (for HttpServlet cases) to validate that only Serializable Objects are placed in the Sesssion Map and that mutations to the Session and ApplicationMap content dirty the entries.

Version:
$Revision$ $Date$

Constructor Summary
CheckSerializationConfigurator()
           
 
Method Summary
 void endRequest(javax.faces.context.ExternalContext extContext)
          Check if any of the non-dirtied checked managed beans have been mutated in this request
 javax.faces.context.ExternalContext getExternalContext(javax.faces.context.ExternalContext extContext)
          Override to return our ExternalContext wrapped if session serialization checking is enabled
static javax.servlet.FilterConfig getFilterConfig(javax.servlet.FilterConfig filterConfig)
          Returns the FilterConfig to use for initializing the filters so that we can wrap it if necessary
static javax.servlet.http.HttpServletRequest getHttpServletRequest(javax.faces.context.ExternalContext extContext, javax.servlet.http.HttpServletRequest request)
          Returns the HttpServletRequest to use for this request, so that we can wrap it if necessary.
static void unregisterApplicationAttribute(javax.faces.context.ExternalContext external, java.lang.String key)
          Unregisters the checking of the specified application attribute
static void unregisterSessionAttribute(javax.faces.context.ExternalContext external, java.lang.String key)
          Unregisters the checking of the specified session attribute
 
Methods inherited from class org.apache.myfaces.trinidad.config.Configurator
beginRequest, destroy, disableConfiguratorServices, init, isConfiguratorServiceDisabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckSerializationConfigurator

public CheckSerializationConfigurator()
Method Detail

getExternalContext

public javax.faces.context.ExternalContext getExternalContext(javax.faces.context.ExternalContext extContext)
Override to return our ExternalContext wrapped if session serialization checking is enabled

Overrides:
getExternalContext in class org.apache.myfaces.trinidad.config.Configurator
Parameters:
extContext -
Returns:

endRequest

public void endRequest(javax.faces.context.ExternalContext extContext)
Check if any of the non-dirtied checked managed beans have been mutated in this request

Overrides:
endRequest in class org.apache.myfaces.trinidad.config.Configurator
Parameters:
extContext -

getFilterConfig

public static javax.servlet.FilterConfig getFilterConfig(javax.servlet.FilterConfig filterConfig)
Returns the FilterConfig to use for initializing the filters so that we can wrap it if necessary

Parameters:
filterConfig -
Returns:

getHttpServletRequest

public static javax.servlet.http.HttpServletRequest getHttpServletRequest(javax.faces.context.ExternalContext extContext,
                                                                          javax.servlet.http.HttpServletRequest request)
Returns the HttpServletRequest to use for this request, so that we can wrap it if necessary.

Parameters:
extContext -
request -
Returns:

unregisterSessionAttribute

public static void unregisterSessionAttribute(javax.faces.context.ExternalContext external,
                                              java.lang.String key)
Unregisters the checking of the specified session attribute

Parameters:
external - ExternalContext
key - Name of session attribute to unregister

unregisterApplicationAttribute

public static void unregisterApplicationAttribute(javax.faces.context.ExternalContext external,
                                                  java.lang.String key)
Unregisters the checking of the specified application attribute

Parameters:
external - ExternalContext
key - Name of session attribute to unregister


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.