org.apache.myfaces.orchestra.requestParameterProvider
Class RequestParameterProviderManager

java.lang.Object
  extended by org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterProviderManager
All Implemented Interfaces:
java.io.Serializable

public class RequestParameterProviderManager
extends java.lang.Object
implements java.io.Serializable

The manager which manage all the attached providers and add their fields to the url.

This class has an instance per user http session. Code that wishes to add values to urls generated within pages register a "provider" with this object. When request params need to be output this manager invokes each provider in turn.

If the data accessed by a registered "provider" has scope shorter than an http session then the registered provider should obviously be deregistered when the data is no longer valid.

This class works together with the RequestParameterServletFilter and RequestParameterResponseWrapper so that every call to response.encodeURL(...) gets forwarded to this class. As encodeURL is used by JSF commandButton, commandLink, etc, this ensures that whatever the user clicks on the parameters provided by the registered provider objects are present on the next JSF request.

See Also:
Serialized Form

Method Summary
 java.lang.String encodeAndAttachParameters(java.lang.String url)
          Encode all fields of all providers, and attach the name-value pairs to url.
static RequestParameterProviderManager getInstance()
           
protected  java.util.List getProviders()
           
protected  boolean isResponseIntercepted()
           
 void register(RequestParameterProvider provider)
          Register the given provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static RequestParameterProviderManager getInstance()

register

public void register(RequestParameterProvider provider)
Register the given provider.

Parameters:
provider - the provider to register.

encodeAndAttachParameters

public java.lang.String encodeAndAttachParameters(java.lang.String url)
Encode all fields of all providers, and attach the name-value pairs to url.

Parameters:
url - the URL to which the fields should be attached.
Returns:
the url after attaching all fields.

isResponseIntercepted

protected boolean isResponseIntercepted()

getProviders

protected java.util.List getProviders()


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.