com.ibm.xsp.context
Class RequestParameters

java.lang.Object
  extended by com.ibm.xsp.context.RequestParameters

public class RequestParameters
extends java.lang.Object

Request parameter. This class allows request based customization.


Nested Class Summary
static interface RequestParameters.ResourceProvider
          Gives the opportunity to add dynamic resources to the page.
static interface RequestParameters.ResponseCacheHeader
          Set the cache strategy for the page.
static interface RequestParameters.RunningContextProvider
          Check if the request is running in a particular context.
static interface RequestParameters.UrlProcessor
          Process the URL when running in a particular context.
 
Field Summary
static int JS_DOJO
           
static int JS_LITE
           
static int JS_NONE
           
 
Constructor Summary
RequestParameters(FacesContextEx context)
           
 
Method Summary
 java.lang.String getCompressMode()
           
 int getJsLibrary()
           
 java.lang.String getLibraryPath()
           
 java.lang.String getLibraryVersion()
           
 java.lang.String getProperty(java.lang.String key)
           
 java.lang.String getRenderKitId()
           
 java.util.List<RequestParameters.ResourceProvider> getResourcesProviders()
           
 RequestParameters.ResponseCacheHeader getResponseCacheHeader()
           
 java.util.List<RequestParameters.RunningContextProvider> getRunningContextProviders()
           
 java.lang.String getStyleKitId()
           
 RequestParameters.UrlProcessor getUrlProcessor()
           
 boolean isClientSideValidation()
           
 boolean isRedirect()
           
static java.lang.String readLibraryPath(ApplicationEx app)
           
static java.lang.String readLibraryVersion(ApplicationEx app)
           
 void removeProperty(java.lang.String key, java.lang.String value)
          Wrong method name or impl.
 void setClientSideValidation(boolean clientSideValidation)
          Set if the request is a client side validation
 void setCompressMode(java.lang.String compressMode)
          Set the value of the Compression Mode
 void setJsLibrary(int jsLibrary)
           
 void setLibraryPath(java.lang.String libraryPath)
           
 void setLibraryVersion(java.lang.String libraryVersion)
           
 void setProperty(java.lang.String key, java.lang.String value)
          Set the value of the key property to value
 void setRedirect(boolean redirect)
          Set this is a redirect
 void setRenderKitId(java.lang.String renderKitId)
          Set the value of the Render Kit Id
 void setResourcesProvider(RequestParameters.ResourceProvider resourcesProvider)
          Add a new ResourceProvider
 void setResponseCacheHeader(RequestParameters.ResponseCacheHeader responseCacheHeader)
          Set the ResponseCacheHeader
 void setRunningContextProvider(RequestParameters.RunningContextProvider runningContextProvider)
          Add a new RunningCOntextProvider
 void setStyleKitId(java.lang.String styleKitId)
          set the value of the Style Kit Id
 void setUrlProcessor(RequestParameters.UrlProcessor urlProcessor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JS_NONE

public static final int JS_NONE
See Also:
Constant Field Values

JS_DOJO

public static final int JS_DOJO
See Also:
Constant Field Values

JS_LITE

public static final int JS_LITE
See Also:
Constant Field Values
Constructor Detail

RequestParameters

public RequestParameters(FacesContextEx context)
Method Detail

readLibraryVersion

public static java.lang.String readLibraryVersion(ApplicationEx app)
Parameters:
app -
Returns:
Return the value of the xsp.client.script.dojo.version property. Default return value is UNKNOWN_DOJO_VERSION if no dojo directory exists.

readLibraryPath

public static java.lang.String readLibraryPath(ApplicationEx app)
Parameters:
app -
Returns:
Return the value of the xsp.client.script.dojo.path property from xsp.properties. If not present, compute value based on dojo install directories. Returns /domjs/dojo-1.3.1/ if not dojo directories exits.

getProperty

public java.lang.String getProperty(java.lang.String key)
Parameters:
key -
Returns:
Return the value of the property

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Set the value of the key property to value

Parameters:
key -
value -

removeProperty

public void removeProperty(java.lang.String key,
                           java.lang.String value)
Wrong method name or impl. Updates key property with value

Parameters:
key -
value -

getJsLibrary

public int getJsLibrary()
Returns:
Returns the value of which JavaScript Library is being used. One of S_NONE, JS_DOJO or JS_LITE

setJsLibrary

public void setJsLibrary(int jsLibrary)
Parameters:
jsLibrary - Set the value of the JavaScript Library

isClientSideValidation

public boolean isClientSideValidation()
Returns:
Retruns the value of the xsp.client.validation FacesContext property

setClientSideValidation

public void setClientSideValidation(boolean clientSideValidation)
Set if the request is a client side validation

Parameters:
clientSideValidation -

isRedirect

public boolean isRedirect()
Returns:
Return true if the request is a redirect

setRedirect

public void setRedirect(boolean redirect)
Set this is a redirect

Parameters:
redirect -

getCompressMode

public java.lang.String getCompressMode()
Returns:
Return the value of the Compression Mode

setCompressMode

public void setCompressMode(java.lang.String compressMode)
Set the value of the Compression Mode

Parameters:
compressMode -

getRenderKitId

public java.lang.String getRenderKitId()
Returns:
Return the Render Kit Id

setRenderKitId

public void setRenderKitId(java.lang.String renderKitId)
Set the value of the Render Kit Id

Parameters:
renderKitId -

getStyleKitId

public java.lang.String getStyleKitId()
Returns:
Return the value of the Style Kit Id

setStyleKitId

public void setStyleKitId(java.lang.String styleKitId)
set the value of the Style Kit Id

Parameters:
styleKitId -

getRunningContextProviders

public java.util.List<RequestParameters.RunningContextProvider> getRunningContextProviders()
Returns:
Return the list of RunningContextProviders

setRunningContextProvider

public void setRunningContextProvider(RequestParameters.RunningContextProvider runningContextProvider)
Add a new RunningCOntextProvider

Parameters:
runningContextProvider -

getUrlProcessor

public RequestParameters.UrlProcessor getUrlProcessor()
Returns:

setUrlProcessor

public void setUrlProcessor(RequestParameters.UrlProcessor urlProcessor)
Parameters:
urlProcessor -

getResponseCacheHeader

public RequestParameters.ResponseCacheHeader getResponseCacheHeader()
Returns:
Return the ResponseCacheHeader

setResponseCacheHeader

public void setResponseCacheHeader(RequestParameters.ResponseCacheHeader responseCacheHeader)
Set the ResponseCacheHeader

Parameters:
responseCacheHeader -

getResourcesProviders

public java.util.List<RequestParameters.ResourceProvider> getResourcesProviders()
Returns:
Return the list of ResourceProviders

setResourcesProvider

public void setResourcesProvider(RequestParameters.ResourceProvider resourcesProvider)
Add a new ResourceProvider

Parameters:
resourcesProvider -

getLibraryPath

public java.lang.String getLibraryPath()
Returns:
the libraryPath

setLibraryPath

public void setLibraryPath(java.lang.String libraryPath)
Parameters:
libraryPath - the libraryPath to set

getLibraryVersion

public java.lang.String getLibraryVersion()
Returns:
the libraryVersion

setLibraryVersion

public void setLibraryVersion(java.lang.String libraryVersion)
Parameters:
libraryVersion - the libraryVersion to set