|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.JspContext
javax.servlet.jsp.PageContext
com.ideo.sweetdevria.mock.MockPageContextImpl
public final class MockPageContextImpl
Mock PageContext object used for "non web" context (exemple : the excel export in batch mode). This object implements only getter/setter methods for attributes.
| Field Summary |
|---|
| Fields inherited from class javax.servlet.jsp.PageContext |
|---|
APPLICATION, APPLICATION_SCOPE, CONFIG, EXCEPTION, OUT, PAGE, PAGE_SCOPE, PAGECONTEXT, REQUEST, REQUEST_SCOPE, RESPONSE, SESSION, SESSION_SCOPE |
| Constructor Summary | |
|---|---|
MockPageContextImpl(javax.servlet.ServletContext context,
javax.servlet.ServletRequest request)
Default constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
findAttribute(java.lang.String name)
Find an attribute. |
void |
forward(java.lang.String relativeUrlPath)
Not implemented ! |
java.lang.Object |
getAttribute(java.lang.String name)
Get the attribute identified by name. |
java.lang.Object |
getAttribute(java.lang.String name,
int scope)
Get the attribute from specified scope. |
java.util.Enumeration |
getAttributeNamesInScope(int scope)
Get attribute names in scope. |
int |
getAttributesScope(java.lang.String name)
Get the scope from an attribute. |
java.lang.Exception |
getException()
Get the exception. |
javax.servlet.jsp.el.ExpressionEvaluator |
getExpressionEvaluator()
Not implemented ! |
javax.servlet.jsp.JspWriter |
getOut()
Not implemented ! |
java.lang.Object |
getPage()
Get the servlet. |
javax.servlet.ServletRequest |
getRequest()
Get the request. |
javax.servlet.ServletResponse |
getResponse()
Get the response. |
javax.servlet.Servlet |
getServlet()
Get the servlet. |
javax.servlet.ServletConfig |
getServletConfig()
Get the servlet config. |
javax.servlet.ServletContext |
getServletContext()
Get the servlet context. |
javax.servlet.http.HttpSession |
getSession()
Get the session. |
javax.servlet.jsp.el.VariableResolver |
getVariableResolver()
Not implemented ! |
void |
handlePageException(java.lang.Exception ex)
Not implemented ! |
void |
handlePageException(java.lang.Throwable t)
Not implemented ! |
void |
include(java.lang.String relativeUrlPath)
Not implemented ! |
void |
include(java.lang.String string,
boolean b)
Not implemented ! |
void |
initialize(javax.servlet.Servlet servlet,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
java.lang.String errorPageURL,
boolean needsSession,
int bufferSize,
boolean autoFlush)
Not implemented ! |
javax.servlet.jsp.JspWriter |
popBody()
Not implemented ! |
javax.servlet.jsp.tagext.BodyContent |
pushBody()
Not implemented ! |
void |
release()
Clear all attributes. |
void |
removeAttribute(java.lang.String name)
Remove attribute. |
void |
removeAttribute(java.lang.String name,
int scope)
Remove the specified attribute. |
void |
setAttribute(java.lang.String name,
java.lang.Object attribute)
Set the attribute. |
void |
setAttribute(java.lang.String name,
java.lang.Object attribute,
int scope)
Set the attribute. |
| Methods inherited from class javax.servlet.jsp.PageContext |
|---|
getErrorData |
| Methods inherited from class javax.servlet.jsp.JspContext |
|---|
pushBody |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockPageContextImpl(javax.servlet.ServletContext context,
javax.servlet.ServletRequest request)
context - servlet contextrequest - servlet request| Method Detail |
|---|
public void initialize(javax.servlet.Servlet servlet,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
java.lang.String errorPageURL,
boolean needsSession,
int bufferSize,
boolean autoFlush)
initialize in class javax.servlet.jsp.PageContextservlet - servletrequest - requestresponse - responseerrorPageURL - errorPageURLneedsSession - needsSessionbufferSize - bufferSizeautoFlush - autoFlushpublic void release()
release in class javax.servlet.jsp.PageContextpublic java.lang.Object getAttribute(java.lang.String name)
getAttribute in class javax.servlet.jsp.JspContextname - Attribute name
public java.lang.Object getAttribute(java.lang.String name,
int scope)
getAttribute in class javax.servlet.jsp.JspContextname - Attribute namescope - (page, request, session, application)
public void setAttribute(java.lang.String name,
java.lang.Object attribute)
setAttribute in class javax.servlet.jsp.JspContextname - Attribute nameattribute - Attribute value
public void setAttribute(java.lang.String name,
java.lang.Object attribute,
int scope)
setAttribute in class javax.servlet.jsp.JspContextname - Attribute nameattribute - Attribute valuescope - (page, request, session, application)
public void removeAttribute(java.lang.String name,
int scope)
removeAttribute in class javax.servlet.jsp.JspContextname - Attribute namescope - (page, request, session, application)public int getAttributesScope(java.lang.String name)
getAttributesScope in class javax.servlet.jsp.JspContextname - Attribute name.
public java.lang.Object findAttribute(java.lang.String name)
findAttribute in class javax.servlet.jsp.JspContextname - Attribute name
public java.util.Enumeration getAttributeNamesInScope(int scope)
getAttributeNamesInScope in class javax.servlet.jsp.JspContextscope - (page, request, session, application)
public void removeAttribute(java.lang.String name)
removeAttribute in class javax.servlet.jsp.JspContextname - Attribute namepublic javax.servlet.jsp.JspWriter getOut()
getOut in class javax.servlet.jsp.JspContextpublic javax.servlet.jsp.el.ExpressionEvaluator getExpressionEvaluator()
getExpressionEvaluator in class javax.servlet.jsp.JspContextpublic javax.servlet.jsp.el.VariableResolver getVariableResolver()
getVariableResolver in class javax.servlet.jsp.JspContextpublic javax.servlet.http.HttpSession getSession()
getSession in class javax.servlet.jsp.PageContextpublic javax.servlet.Servlet getServlet()
public javax.servlet.ServletConfig getServletConfig()
getServletConfig in class javax.servlet.jsp.PageContextpublic javax.servlet.ServletContext getServletContext()
getServletContext in class javax.servlet.jsp.PageContextpublic javax.servlet.ServletRequest getRequest()
getRequest in class javax.servlet.jsp.PageContextpublic javax.servlet.ServletResponse getResponse()
getResponse in class javax.servlet.jsp.PageContextpublic java.lang.Exception getException()
getException in class javax.servlet.jsp.PageContextpublic java.lang.Object getPage()
getPage in class javax.servlet.jsp.PageContext
public void include(java.lang.String relativeUrlPath)
throws javax.servlet.ServletException,
java.io.IOException
include in class javax.servlet.jsp.PageContextrelativeUrlPath - relative url path
javax.servlet.ServletException
java.io.IOException
public void include(java.lang.String string,
boolean b)
throws javax.servlet.ServletException,
java.io.IOException
include in class javax.servlet.jsp.PageContextstring - stringb - boolean
javax.servlet.ServletException
java.io.IOException
public void forward(java.lang.String relativeUrlPath)
throws javax.servlet.ServletException,
java.io.IOException
forward in class javax.servlet.jsp.PageContextrelativeUrlPath - relative url path
javax.servlet.ServletException
java.io.IOExceptionpublic javax.servlet.jsp.tagext.BodyContent pushBody()
pushBody in class javax.servlet.jsp.PageContextpublic javax.servlet.jsp.JspWriter popBody()
popBody in class javax.servlet.jsp.JspContext
public void handlePageException(java.lang.Exception ex)
throws java.io.IOException,
javax.servlet.ServletException
handlePageException in class javax.servlet.jsp.PageContextex - exception
java.io.IOException
javax.servlet.ServletException
public void handlePageException(java.lang.Throwable t)
throws java.io.IOException,
javax.servlet.ServletException
handlePageException in class javax.servlet.jsp.PageContextt - throwable
java.io.IOException
javax.servlet.ServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||