|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fatwire.services.beans.BaseBean
com.fatwire.services.beans.ServiceResponse
public class ServiceResponse
This class encapsulates a response value object populated by the services.
The response may arise out of a successful transaction, a warning or error. It can associate an end-user message to describe the response, a severity, and an error code to classify the transaction.
Nested Class Summary | |
---|---|
static class |
ServiceResponse.Severity
This class enumerates severities of conditions handled in the service modules. |
static class |
ServiceResponse.Status
An enumeration of possible states which a response can have. |
Constructor Summary | |
---|---|
ServiceResponse()
Default constructor. |
|
ServiceResponse(ServiceResponse.Severity severity)
Overloaded constructor with a standard severity. |
|
ServiceResponse(java.lang.String severity)
Overloaded constructor with a free-form severity. |
Method Summary | |
---|---|
java.util.List<java.lang.String> |
getMessages()
Returns a list of descriptive messages returned from the service. |
void |
setSeverity(ServiceResponse.Severity severity)
Sets the severity of this response from one of the standard values specified. |
void |
setSeverity(java.lang.String severity)
Sets the severity of this response. |
void |
setStatus(java.lang.Integer status)
Sets a custom status code to be associated with this response. |
void |
setStatus(ServiceResponse.Status status)
Sets a status code to be associated with this response from one of the standard values specified. |
java.lang.String |
severity()
Returns the severity of this response, as an upper case string, otherwise returns null. |
java.lang.Integer |
status()
Returns the status code, if any, associated with this response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceResponse()
Default constructor.
Creates an empty service response object with severityServiceResponse.Severity.INFO
.
public ServiceResponse(ServiceResponse.Severity severity)
Overloaded constructor with a standard severity.
Creates an empty service response object with the specified severity. For free-form values,ServiceResponse.ServiceResponse(String)
may be used.
severity
- The severity for this response object.public ServiceResponse(java.lang.String severity)
Overloaded constructor with a free-form severity.
Creates an empty service response object with the specified free-form severity. For enumerated values,ServiceResponse.ServiceResponse(Severity)
may
be used.
severity
- The severity for this response object.Method Detail |
---|
public java.util.List<java.lang.String> getMessages()
public void setSeverity(java.lang.String severity)
ServiceResponse.setSeverity(Severity)
may be
used.
severity
- Severity of this response.ServiceResponse.Severity
public void setSeverity(ServiceResponse.Severity severity)
ServiceResponse.setSeverity(String)
may be used.
severity
- Severity of this response.ServiceResponse.Severity
public java.lang.String severity()
public java.lang.Integer status()
public void setStatus(java.lang.Integer status)
Sets a custom status code to be associated with this response.
For enumerated values,ServiceResponse.setStatus(Status)
may be used.
status
- - Status to be associated with this response.public void setStatus(ServiceResponse.Status status)
Sets a status code to be associated with this response from one of the standard values specified.
For custom values,ServiceResponse.setStatus(Integer)
may be used.
status
- - Status to be associated with this response.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |