public abstract class Response extends XMLMessage
Modifier and Type | Field and Description |
---|---|
protected String |
commandType |
protected String |
detailText |
protected Request<?> |
request |
protected String |
summaryText |
content, xPath
Constructor and Description |
---|
Response() |
Modifier and Type | Method and Description |
---|---|
String |
getDetailText()
Returns the Detail text element if available
|
Request<?> |
getRequest() |
static <T extends Response> |
getResponse(Class<T> clazz,
String responseContent,
Request<?> request)
This creates an object that extends the Response class with the given
response content.
|
String |
getSummaryText()
Returns the Summary text element if available
|
boolean |
isCommandType(String type)
Determine whether this response has a command (element) "xsi:type"
(attribute) value of "c:" + commandType or literally commandType.
|
boolean |
isErrorResponse()
Returns true if the "xsi:type" of this response is a "ErrorResponse".
|
protected abstract void |
transform()
Transforms the Response from XML Content to a populated POJO
|
getBoolean, getContent, getDate, getDateTime, getFloat, getInteger, getIntegerArray, getLong, getNode, getNodeArray, getNumber, getString, getStringArray, getTime, setContent
@GwtIncompatible protected transient Request<?> request
protected String commandType
protected String summaryText
protected String detailText
@GwtIncompatible public static <T extends Response> Response getResponse(Class<T> clazz, String responseContent, Request<?> request)
clazz
- The Response extension class to instantiateresponseContent
- The Response content to create the class with@GwtIncompatible protected abstract void transform()
@GwtIncompatible public Request<?> getRequest()
public String getSummaryText()
public String getDetailText()
public boolean isCommandType(String type) throws RequestException
type
- The command type to checkRequestException
- if the command element is not found.public boolean isErrorResponse()
Copyright © 2017 ECG. All rights reserved.