|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.myfaces.tomahawk.util.RequestType
public class RequestType
TODO: This class is a copy of org.apache.myfaces.commons.util.RequestType Since tomahawk should be compatible with 1.1, this is placed here and there is not a dependency for myfaces-commons-utils, because this stuff only works for 1.2 (this class is also compatible with jdk 1.4) Represents the type of request currently in the ExternalContext. All servlet requests will be of the SERVLET requestType whereas all of the other RequestTypes will be portlet type requests. There are a number of convenience methods on the RequestType enumeration which can be used to determine the capabilities of the current request.
Field Summary | |
---|---|
static RequestType |
ACTION
The type for a portlet ActionRequest. |
static RequestType |
EVENT
The type for a portlet EventRequest. |
static RequestType |
RENDER
The type for a portlet RenderRequest. |
static RequestType |
RESOURCE
The type for a portlet ResourceRequest. |
static RequestType |
SERVLET
The type for all servlet requests. |
Method Summary | |
---|---|
boolean |
isPortlet()
Returns true if the response for this
RequestType originated from a JSR-168 or JSR-286
portlet container. |
boolean |
isRequestFromClient()
Returns true if this request was a direct
result of a call from the client. |
boolean |
isResponseWritable()
Returns true if the response for this
RequestType is intended to produce output to the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final RequestType SERVLET
public static final RequestType RENDER
public static final RequestType ACTION
public static final RequestType RESOURCE
public static final RequestType EVENT
Method Detail |
---|
public boolean isRequestFromClient()
true
if this request was a direct
result of a call from the client. This implies that
the current application is the "owner" of the current
request and that it has access to the inputStream, can
get and set character encodings, etc. Currently all
SERVLET, ACTION, and RESOURCE RequestTypes are client
requests.
true
if the current request is a
client data type request and false
if it is not.public boolean isResponseWritable()
true
if the response for this
RequestType is intended to produce output to the client.
Currently the SERVLET, RENDER, and RESOURCE request are
response writable.
true
if the current request is
intended to produce output and false
if it is not.public boolean isPortlet()
true
if the response for this
RequestType originated from a JSR-168 or JSR-286
portlet container. Currently RENDER, ACTION,
RESOURCE, and EVENT RequestTypes are all portlet
requests.
true
if the current request
originated inside of a JSR-168 or JSR-286
Portlet Container or false
if
it did not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |