com.liferay.faces.util.context
Class FacesRequestContext

java.lang.Object
  extended by com.liferay.faces.util.context.FacesRequestContext
Direct Known Subclasses:
FacesRequestContextImpl

public abstract class FacesRequestContext
extends Object

This class defines the usage of a ThreadLocal singleton that exists alongside the FacesContext.

Author:
Kyle Stiemann

Constructor Summary
FacesRequestContext()
           
 
Method Summary
abstract  void addScript(Script script)
          Adds the specified Script to the list of scripts that are to be executed on the client.
abstract  void addScript(String script)
          Adds the specified script to the list of scripts that are to be executed on the client.
static FacesRequestContext getCurrentInstance()
           
abstract  List<Script> getScripts()
          Returns an immutable list of scripts that were added via the addScript(Script) or addScript(String) method.
abstract  void release()
          Releases any resources that are associated with this FacesRequestContext instance.
static void setCurrentInstance(FacesRequestContext facesRequestContext)
          Sets or removes the value of the ThreadLocal singleton instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesRequestContext

public FacesRequestContext()
Method Detail

getCurrentInstance

public static FacesRequestContext getCurrentInstance()

setCurrentInstance

public static void setCurrentInstance(FacesRequestContext facesRequestContext)
Sets or removes the value of the ThreadLocal singleton instance.

Parameters:
facesRequestContext - If a non-null value is specified, then it will become the singleton value. If null is specified, then singleton value is removed from the ThreadLocal. is removed.

addScript

public abstract void addScript(Script script)
Adds the specified Script to the list of scripts that are to be executed on the client.


addScript

public abstract void addScript(String script)
Adds the specified script to the list of scripts that are to be executed on the client.


release

public abstract void release()
Releases any resources that are associated with this FacesRequestContext instance.


getScripts

public abstract List<Script> getScripts()
Returns an immutable list of scripts that were added via the addScript(Script) or addScript(String) method.



Copyright © 2015 Liferay, Inc.. All rights reserved.