|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.context.AbstractContext org.apache.velocity.VelocityContext org.apache.cocoon.generation.VelocityGenerator.ChainedContext
public static class VelocityGenerator.ChainedContext
Velocity context implementation specific to the Servlet environment.
It provides the following special features:
The internalGet(String key)
method implements the following search order
for objects:
The purpose of this class is to make it easy for web designer to work with Java servlet based web applications. They do not need to be concerned with the concepts of request, session or application attributes and the live time of objects in these scopes.
Note that the put() method always puts objects into the local hashtable.
Acknowledge: the source code is borrowed from the jakarta-velocity-tools project with slight modifications.
Field Summary | |
---|---|
static String |
APPLICATION
Key to the servlet context object. |
static String |
PARAMETERS
Key to the servlet context object. |
static String |
REQUEST
Key to the HTTP request object. |
static String |
RESPONSE
Key to the HTTP response object. |
static String |
SESSION
Key to the HTTP session object. |
Constructor Summary | |
---|---|
VelocityGenerator.ChainedContext(org.apache.velocity.context.Context ctx,
Request request,
Response response,
Context application,
Parameters parameters)
Default constructor. |
Method Summary | |
---|---|
org.apache.velocity.app.event.EventCartridge |
attachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)
|
org.apache.velocity.runtime.resource.Resource |
getCurrentResource()
|
String |
getCurrentTemplateName()
|
org.apache.velocity.app.event.EventCartridge |
getEventCartridge()
|
Object[] |
getTemplateNameStack()
|
org.apache.velocity.util.introspection.IntrospectionCacheData |
icacheGet(Object arg0)
|
void |
icachePut(Object arg0,
org.apache.velocity.util.introspection.IntrospectionCacheData arg1)
|
Object |
internalGet(String key)
Looks up and returns the object with the specified key. |
void |
popCurrentTemplateName()
|
void |
pushCurrentTemplateName(String arg0)
|
void |
setCurrentResource(org.apache.velocity.runtime.resource.Resource arg0)
|
Methods inherited from class org.apache.velocity.VelocityContext |
---|
clone, internalContainsKey, internalGetKeys, internalPut, internalRemove |
Methods inherited from class org.apache.velocity.context.AbstractContext |
---|
containsKey, get, getChainedContext, getKeys, put, remove |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REQUEST
public static final String RESPONSE
public static final String SESSION
public static final String APPLICATION
public static final String PARAMETERS
Constructor Detail |
---|
public VelocityGenerator.ChainedContext(org.apache.velocity.context.Context ctx, Request request, Response response, Context application, Parameters parameters)
Method Detail |
---|
public Object internalGet(String key)
Looks up and returns the object with the specified key.
See the class documentation for more details.
internalGet
in class org.apache.velocity.VelocityContext
key
- the key of the object requested
public void pushCurrentTemplateName(String arg0)
public void popCurrentTemplateName()
public String getCurrentTemplateName()
public Object[] getTemplateNameStack()
public org.apache.velocity.util.introspection.IntrospectionCacheData icacheGet(Object arg0)
public void icachePut(Object arg0, org.apache.velocity.util.introspection.IntrospectionCacheData arg1)
public void setCurrentResource(org.apache.velocity.runtime.resource.Resource arg0)
public org.apache.velocity.runtime.resource.Resource getCurrentResource()
public org.apache.velocity.app.event.EventCartridge attachEventCartridge(org.apache.velocity.app.event.EventCartridge arg0)
attachEventCartridge
in interface org.apache.velocity.context.InternalEventContext
public org.apache.velocity.app.event.EventCartridge getEventCartridge()
getEventCartridge
in interface org.apache.velocity.context.InternalEventContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |