|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.portal.struts.portlet.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 call to send error.
If an error is detected when creating or executing IViewCommands, then a StrutsViewErrorCommand 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)
Construct an ErrorResponseInfo object with error code only and no text |
|
ErrorResponseInfo(int errorCode,
java.lang.String errorText)
Construct an ErrorResponseInfo object with error code and text |
Method Summary | |
---|---|
static void |
clearErrorResponse(PortletRequest request)
Remove error information. |
int |
getErrorCode()
Return the error code |
static ErrorResponseInfo |
getErrorResponse(PortletRequest request)
This method will return the ErrorResponseInfo object from session if one can be found. |
java.lang.String |
getErrorText()
Return the error text |
static void |
setErrorResponse(PortletRequest request,
int errorCode)
This method is used to set an error code. |
static void |
setErrorResponse(PortletRequest request,
int errorCode,
java.lang.String errorText)
This method is used to set 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 codepublic ErrorResponseInfo(int errorCode, java.lang.String errorText)
errorCode
- the int error codeerrorText
- the error textMethod Detail |
---|
public int getErrorCode()
public java.lang.String getErrorText()
null
public static ErrorResponseInfo getErrorResponse(PortletRequest request)
request
- the request object
null
otherwisepublic static void setErrorResponse(PortletRequest request, int errorCode)
request
- the request objecterrorCode
- the error status codepublic static void setErrorResponse(PortletRequest request, int errorCode, java.lang.String errorText)
request
- the request objecterrorCode
- the error status codeerrorText
- the error status textpublic static void clearErrorResponse(PortletRequest request)
StrutsViewCommand
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 |