| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.wps.portlets.struts.ErrorResponseInfo
public class ErrorResponseInfo
The ErrorResponseInfo class is used to support sendError in the Struts Portlet Framework. Instances of this class will store the error code and error text from the sendError call.
If an error is detected when creating or executing IViewCommands
,
then a WpsStrutsViewErrorCommand object is created to display the error.
A class that extends IErrorResponseFormatter is used to format the
display of the error.
Constructor Summary | |
---|---|
ErrorResponseInfo(int errorCode)
Constructs an ErrorResponseInfo object with only the error code (that is, no text). | |
ErrorResponseInfo(int errorCode,
java.lang.String errorText)
Constructs an ErrorResponseInfo object with error code and text. |
Method Summary | |
---|---|
static void | clearErrorResponse(HttpServletRequest request)
Removes error information. |
int | getErrorCode()
Returns the error code. |
static ErrorResponseInfo | getErrorResponse(HttpServletRequest request)
Returns the ErrorResponseInfo object from session if
one can be found.
|
java.lang.String | getErrorText()
Returns the error text. |
static void | setErrorResponse(HttpServletRequest request,
int errorCode)
Sets an error code. |
static void | setErrorResponse(HttpServletRequest request,
int errorCode,
java.lang.String errorText)
Sets an error code and error text. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorResponseInfo(int errorCode)
public ErrorResponseInfo(int errorCode, java.lang.String errorText)
Method Detail |
---|
public int getErrorCode()
public java.lang.String getErrorText()
null
if not setpublic static ErrorResponseInfo getErrorResponse(HttpServletRequest request)
ErrorResponseInfo
object from session if
one can be found. If null
is returned then the processing did not result
in a call to sendError.
null
otherwisepublic static void setErrorResponse(HttpServletRequest request, int errorCode)
IViewCommands
are created. If an error has been detected then a
WpsStrutsViewErrorCommand will be created.
public static void setErrorResponse(HttpServletRequest request, int errorCode, java.lang.String errorText)
IViewCommands
are created. If an
error has been detected then a WpsStrutsViewErrorCommand object
will be created.
public static void clearErrorResponse(HttpServletRequest request)
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |