Esri Geoportal Server
1.0

com.esri.gpt.framework.jsf
Class FacesContextBroker

java.lang.Object
  extended by com.esri.gpt.framework.jsf.FacesContextBroker
Direct Known Subclasses:
UiContext

public class FacesContextBroker
extends Object

Broker for a JSF FacesContext.


Constructor Summary
FacesContextBroker()
          Default constructor.
FacesContextBroker(HttpServletRequest request, HttpServletResponse response)
          Constructs a Faces context broker from the current HTTP request.
 
Method Summary
 HttpServletRequest extractHttpServletRequest()
          Extracts the HttpServletRequest from the Faces context instance.
 HttpServletResponse extractHttpServletResponse()
          Extracts the HttpServletResponse from the Faces context instance.
 HttpSession extractHttpSession()
          Extracts the HttpSession from the Faces context instance.
 MessageBroker extractMessageBroker()
          Extract the MessageBroker from the Faces context instance.
 PageContext extractPageContext()
          Extract the PageContext from the Faces context instance.
 RequestContext extractRequestContext()
          Extract the request context from the Faces context instance.
 ServletContext extractServletContext()
          Extracts the ServletContext from the Faces context instance.
 UIViewRoot extractViewRoot()
          Extracts the ServletContext from the Faces context instance.
 ExternalContext getExternalContext()
          Gets the external context associated with the current FacesContext instance.
 FacesContext getFacesContext()
          Gets the current FacesContext instance.
 Object resolveManagedBean(String managedBeanName)
          Resolves a managed bean variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesContextBroker

public FacesContextBroker()
Default constructor.


FacesContextBroker

public FacesContextBroker(HttpServletRequest request,
                          HttpServletResponse response)
Constructs a Faces context broker from the current HTTP request.

Parameters:
request - the HTTP request
response - the HTTP response
Method Detail

getExternalContext

public ExternalContext getExternalContext()
Gets the external context associated with the current FacesContext instance.

Returns:
the external context

getFacesContext

public FacesContext getFacesContext()
Gets the current FacesContext instance.

Returns:
the FacesContext

extractHttpServletRequest

public HttpServletRequest extractHttpServletRequest()
Extracts the HttpServletRequest from the Faces context instance.

Returns:
the HttpServletRequest (null if none);

extractHttpServletResponse

public HttpServletResponse extractHttpServletResponse()
Extracts the HttpServletResponse from the Faces context instance.

Returns:
the HttpServletResponse (null if none);

extractHttpSession

public HttpSession extractHttpSession()
Extracts the HttpSession from the Faces context instance.

Returns:
the HttpSession (null if none);

extractMessageBroker

public MessageBroker extractMessageBroker()
Extract the MessageBroker from the Faces context instance.

Returns:
the MessageBroker

extractPageContext

public PageContext extractPageContext()
Extract the PageContext from the Faces context instance.

Returns:
the PageContext

extractRequestContext

public RequestContext extractRequestContext()
Extract the request context from the Faces context instance.

Returns:
the request context

extractServletContext

public ServletContext extractServletContext()
Extracts the ServletContext from the Faces context instance.

Returns:
the ServletContext (null if none);

extractViewRoot

public UIViewRoot extractViewRoot()
Extracts the ServletContext from the Faces context instance.

Returns:
the ServletContext (null if none);

resolveManagedBean

public Object resolveManagedBean(String managedBeanName)
Resolves a managed bean variable.

Parameters:
managedBeanName - the configured name of the managed bean
Returns:
the located object (can be null)

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.