|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bea.wlp.rest.results.GenericRestResult
com.bea.wlp.rest.results.ErrorResult
public class ErrorResult
Implementation of a basic error type RestResult that
can be used to easily return a set of ErrorCodes which are
defined in this class. This class has default versions of the error
messages that are associated with each definited error code available
by default, which can be overridden to a custom message by using the setMessage method.
Optionally, the secondary constructor can be used to supply a custom
integer status value and a custom error message.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.bea.wlp.rest.results.RestResult |
|---|
RestResult.FormatType |
| Field Summary |
|---|
| Fields inherited from class com.bea.wlp.rest.results.GenericRestResult |
|---|
contentType, debug, formatters, JSON_CONTENT_TYPE, XML_CONTENT_TYPE |
| Constructor Summary | |
|---|---|
ErrorResult(int status,
String message)
Constructs an ErrorResult with the specified
status number and the specified error message to be
associated with that ErrorCode. |
|
ErrorResult(ResponseCode responseCode)
Constructs an ErrorResult with the specified
ResponseCode and the default error message
associated with that ResponseCode. |
|
| Method Summary | |
|---|---|
String |
getMessage()
Gets the error message for this ErrorResult |
Object |
getResponseBean()
Gets this RestResult as a JavaBean Object. |
int |
getStatus()
Gets the status number as a String for this ErrorResult |
boolean |
isError()
Marks this ErrorResult type for handling as an HTTP error. |
void |
setMessage(String message)
Sets a custom message for this ErrorResult |
| Methods inherited from class com.bea.wlp.rest.results.GenericRestResult |
|---|
getCharacterEncoding, getContentType, getFormatters, getResponse, setCharacterEncoding, setFormatters, setResponseBean, toJSON, toXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorResult(ResponseCode responseCode)
ErrorResult with the specified
ResponseCode and the default error message
associated with that ResponseCode.
responseCode - the ResponseCode for the ErrorResult
public ErrorResult(int status,
String message)
ErrorResult with the specified
status number and the specified error message to be
associated with that ErrorCode.
status - the status number for the ErrorResultmessage - the error message to associate to this ErrorResult| Method Detail |
|---|
public void setMessage(String message)
ErrorResult
message - the error message textpublic int getStatus()
String for this ErrorResult
getStatus in interface RestResultgetStatus in class GenericRestResultpublic boolean isError()
isError in interface RestResultisError in class GenericRestResultpublic String getMessage()
ErrorResult
getMessage in interface RestResultgetMessage in class GenericRestResultpublic Object getResponseBean()
RestResult as a JavaBean Object.
getResponseBean in interface RestResultgetResponseBean in class GenericRestResultResponseMessage object that composes this result
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||