|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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)
errorCode - the int error code
public ErrorResponseInfo(int errorCode,
java.lang.String errorText)
errorCode - the int error codeerrorText - the error text| 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.
request - the request object
null otherwise
public static void setErrorResponse(HttpServletRequest request,
int errorCode)
IViewCommands are created. If an error has been detected then a
WpsStrutsViewErrorCommand will be created.
request - the request objecterrorCode - the error status code
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.
request - the request objecterrorCode - the error status codeerrorText - the error status textpublic static void clearErrorResponse(HttpServletRequest request)
WpsStrutsViewCommand
has been created for this error, the error information should be removed.
request - the request object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||