|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.userprofiling.email.TemplateInvoker.TemplateSession
public class TemplateInvoker.TemplateSession
Represents a template rendering session. An instance is created via TempalteInvoker.createSession(), renderTemplate() can then be called multiple times, followed by endSession().
Constructor Summary | |
---|---|
TemplateInvoker.TemplateSession(java.util.Map pParameterMap,
atg.userprofiling.email.RequestResponseInitializer pReqResInitializer)
Create a TemplateSession... |
Method Summary | |
---|---|
protected void |
beforeRender(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method provides a final opportunity to modify the request and response before rendering. |
protected void |
createCurrentRequestAndResponse(java.lang.String pTemplateURL)
Create and initialize the current request and response. |
protected DynamoHttpServletRequest |
createRequestAndSetCurrent(DynamoHttpServletResponse pResponse,
java.lang.String pTemplateURL)
Create a request DynamoHttpServletRequest and set as the value of our currentRequest property. |
void |
endSession()
End the session... |
DynamoHttpServletRequest |
getCurrentRequest()
Get the request associated with the session. |
DynamoHttpServletResponse |
getCurrentResponse()
Get the response associated with the session. |
java.lang.String |
getSessionId()
Get the session id for the current session. |
java.lang.String |
renderTemplate(java.lang.String pTemplateURL,
java.lang.Object pReqResInitArgument)
Render the specified template. |
void |
setParameter(java.lang.String pName,
java.lang.Object pValue)
Set/update a parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateInvoker.TemplateSession(java.util.Map pParameterMap, atg.userprofiling.email.RequestResponseInitializer pReqResInitializer) throws TemplateEmailException
pParameterMap
- the map of Parameters to go into the session.pReqResInitializer
- The request/response initializer.
TemplateEmailException
Method Detail |
---|
public java.lang.String getSessionId()
public DynamoHttpServletRequest getCurrentRequest()
public DynamoHttpServletResponse getCurrentResponse()
protected DynamoHttpServletRequest createRequestAndSetCurrent(DynamoHttpServletResponse pResponse, java.lang.String pTemplateURL) throws TemplateEmailException
pResponse
- the response to use. Created by createResponse()pTemplateURL
- the URL of the template to render.
TemplateEmailException
public void endSession()
protected void createCurrentRequestAndResponse(java.lang.String pTemplateURL) throws TemplateEmailException
pTemplateURL
- the URL of the template to render.
TemplateEmailException
public java.lang.String renderTemplate(java.lang.String pTemplateURL, java.lang.Object pReqResInitArgument) throws TemplateEmailException
This default implementation simply calls the
templateRendererServlet
's service
method, and captures and returns the response's output. The
renderer servlet can access the template URL by calling
getPathInfo
on the request.
Subclasses may override this method to implement other schemes for rendering the template.
pTemplateURL
- the template URLpReqResInitializer
- The argument passed to the request/response initializer.
TemplateEmailException
- if an error occurred while
rendering the templateprotected void beforeRender(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- public void setParameter(java.lang.String pName, java.lang.Object pValue)
pName
- the name of the parameterpValue
- the new value for the parameter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |