|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.util.ExternalContextUtils
public class ExternalContextUtils
This provides some functionality for determining some things about the native request object that is not provided by the base utils.
Method Summary | |
---|---|
static java.lang.String |
getCharacterEncoding(javax.faces.context.ExternalContext externalContext)
Returns the character encoding or null if there isn't any |
static int |
getContentLength(javax.faces.context.ExternalContext externalContext)
Returns the content length or -1 if the unknown. |
static java.lang.String |
getContentType(javax.faces.context.ExternalContext externalContext)
Returns the content type from the current externalContext or null if unknown. |
static java.lang.String |
getContextName(javax.faces.context.ExternalContext externalContext)
Returns the name of the underlying context |
static java.lang.String |
getRequestedSessionId(javax.faces.context.ExternalContext externalContext)
Returns the session ID for the client, or null if there is none. |
static java.io.InputStream |
getRequestInputStream(javax.faces.context.ExternalContext externalContext)
Returns the request input stream if one is available |
static boolean |
isAction(javax.faces.context.ExternalContext externalContext)
Returns true if this externalContext represents an "action". |
static boolean |
isPortlet(javax.faces.context.ExternalContext externalContext)
Returns whether or not this external context is from a Portlet or a Servlet. |
static boolean |
isRequestedSessionIdValid(javax.faces.context.ExternalContext externalContext)
Checks if the requested session ID is still valid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getRequestedSessionId(javax.faces.context.ExternalContext externalContext)
externalContext
-
public static boolean isRequestedSessionIdValid(javax.faces.context.ExternalContext externalContext)
externalContext
-
public static java.lang.String getCharacterEncoding(javax.faces.context.ExternalContext externalContext)
externalContext
-
public static java.lang.String getContextName(javax.faces.context.ExternalContext externalContext)
externalContext
- the ExternalContex
public static int getContentLength(javax.faces.context.ExternalContext externalContext)
externalContext
- the ExternalContext
public static java.lang.String getContentType(javax.faces.context.ExternalContext externalContext)
null
if unknown.
externalContext
- the ExternalContext
null
public static java.io.InputStream getRequestInputStream(javax.faces.context.ExternalContext externalContext) throws java.io.IOException
externalContext
-
java.io.IOException
public static boolean isAction(javax.faces.context.ExternalContext externalContext)
true
if this externalContext represents an "action". An action request
is any ServletRequest or a portlet ActionRequest. It is assumed that the ExternalContext
true
if this is a Portlet ActionRequest or an non-portlet
request.public static boolean isPortlet(javax.faces.context.ExternalContext externalContext)
externalContext
- the ExternalContext to check
true
if this is a portlet RenderRequest or ActionRequest and
false if it is not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |