|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jp.ne.dti.lares.foozy.pagemixer.servlet.ServletConsumerContext
Consumer conetxt implementation for Servlet environment.
This is consumer context implementation for Servlet environment.
But almost all processings are delegated to
ServletConsumerContext.KeyCommand
implementation classes.
You can use ServletConsumerContext.KeyCommand
implementation classes
as key to identify value with
HashMapConsumerContext
as same as with ServletConsumerContext
,
because those override hasCode()
and
equals(Object)
for ordinal use.
Inner Class Summary | |
static class |
ServletConsumerContext.ApplicationKey
Deprecated. by non inner ApplicationKey class |
static class |
ServletConsumerContext.ContextInitKey
Deprecated. by non inner ContextInitKey class |
static class |
ServletConsumerContext.CookieKey
Deprecated. by non inner CookieKey class |
static interface |
ServletConsumerContext.KeyCommand
This provides abstraction of attribute/parameter accessing. |
static class |
ServletConsumerContext.ParameterKey
Deprecated. by non inner ParameterKey class |
static class |
ServletConsumerContext.ReqHeaderKey
Deprecated. by non inner ReqHeaderKey class |
static class |
ServletConsumerContext.RequestKey
Deprecated. by non inner RequestKey class |
static class |
ServletConsumerContext.ResHeaderKey
Deprecated. by non inner ResHeaderKey class |
static class |
ServletConsumerContext.ServletInitKey
Deprecated. by non inner ServletInitKey class |
static class |
ServletConsumerContext.SessionKey
Deprecated. by non inner SessionKey class |
Field Summary | |
static RequestKey |
BASE_HREF_KEY
Key to access string as href value of "base" tag. |
static java.lang.Object |
CONTEXT_PATH_KEY
Deprecated. by RequestMethodKey.CONTEXT_PATH |
static RequestKey |
XHTML_KEY
Key to store/access result of XHTML-ness examination. |
Constructor Summary | |
ServletConsumerContext(javax.servlet.http.HttpServlet servlet,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Construct consumer context for specified servlet environment. |
Method Summary | |
java.lang.String |
encode(java.lang.String url)
Get encoded URL string to include the session ID. |
javax.servlet.ServletContext |
getContext()
Get ServletContext . |
javax.servlet.http.HttpServletRequest |
getRequest()
Get HttpServletRequest . |
javax.servlet.http.HttpServletResponse |
getResponse()
Get HttpServletResponse . |
javax.servlet.http.HttpServlet |
getServlet()
Get HttpServlet . |
java.lang.Object |
getValue(java.lang.Object key)
Get value identified by key. |
void |
setValue(java.lang.Object key,
java.lang.Object value)
Set value identified by key. |
void |
unsetValue(java.lang.Object key)
Un-set value identified by key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final RequestKey BASE_HREF_KEY
This value is PageMixer specific one.
You can get java.lang.String
,
which can be used as "href" value of "base" tag for
"servlet context root" of current request.
This value is composed by
ServletUtil#getBaseHref(context, true, true)
.
This value is ensured not to be "null".
public static final java.lang.Object CONTEXT_PATH_KEY
RequestMethodKey.CONTEXT_PATH
This is equivalent to
RequestMethodKey.CONTEXT_PATH
public static final RequestKey XHTML_KEY
This value is PageMixer specific one.
This is defined as the key object for
XHTMLDetectFilter
.
The value identified by this key object is not created automatically,
because this value depends not on ConsumerContext
but on target HTML page.
So, you should apply
XHTMLDetectFilter
before your custom filter,
which depends on this key object.
Constructor Detail |
public ServletConsumerContext(javax.servlet.http.HttpServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
In this consrructor, values identified below keys are stored into context.
servlet
- of current requestrequest
- of current request to Servletresponse
- of current request to ServletMethod Detail |
public final javax.servlet.http.HttpServlet getServlet()
HttpServlet
.HttpServlet
on which this context depends.public final javax.servlet.ServletContext getContext()
ServletContext
.ServletContext
on which this context depends.public final javax.servlet.http.HttpServletRequest getRequest()
HttpServletRequest
.HttpServletRequest
on which this context depends.public final javax.servlet.http.HttpServletResponse getResponse()
HttpServletResponse
.HttpServletResponse
on which this context depends.public java.lang.Object getValue(java.lang.Object key)
This treat key
parameter as
instance of ServletConsumerContext.KeyCommand
implemenation class,
and delegate value getting to it.
getValue
in interface ConsumerContext
key
- key to identify valuepublic void setValue(java.lang.Object key, java.lang.Object value)
This treat key
parameter as
instance of ServletConsumerContext.KeyCommand
implemenation class,
and delegate value setting to it.
setValue
in interface ConsumerContext
key
- key to identify valuevalue
- value identified by keypublic void unsetValue(java.lang.Object key)
This treat key
parameter as
instance of ServletConsumerContext.KeyCommand
implemenation class,
and delegate value setting to it.
unsetValue
in interface ConsumerContext
key
- key to identify valuepublic java.lang.String encode(java.lang.String url)
This invokes encodeURL(String)
of
HttpServletResponse
.
encode
in interface ConsumerContext
url
- URL to encode
|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |