public abstract class Response extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
DATEFORMAT |
static String |
DATETIMEFORMAT |
protected Request<?> |
request |
protected String |
responseContent |
protected XPath |
xPath |
Constructor and Description |
---|
Response() |
Modifier and Type | Method and Description |
---|---|
protected Boolean |
getBoolean(String xPathExpression)
Get a Boolean element by XPath Expression
|
protected Date |
getDate(String xPathExpression)
Returns the Date given the XML path.
|
protected Date |
getDateTime(String xPathExpression)
Returns the Date given the XML path.
|
String |
getDetailText()
Returns the Detail text element if available
|
protected Float |
getFloat(String xPathExpression) |
protected Integer |
getInteger(String xPathExpression) |
protected Integer[] |
getIntegerArray(String xPathExpression)
Get an array of Integer elements by XPath Expression
|
protected Long |
getLong(String xPathExpression) |
protected Node |
getNode(String xPathExpression)
Get a Node element by XPath Expression
|
protected Node[] |
getNodeArray(String xPathExpression)
Get an array of Node elements by XPath Expression
|
protected Double |
getNumber(String xPathExpression)
Get a Double element by XPath Expression
|
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 |
getResponseContent() |
protected String |
getString(String xPathExpression)
Get a String element by XPath Expression
|
protected String[] |
getStringArray(String xPathExpression)
Get an array of String elements by XPath Expression
|
String |
getSummaryText()
Returns the Summary text element if available
|
boolean |
isCommandType(String commandType)
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 "ErrorRersponse".
|
protected abstract void |
transform()
Transforms the Response from XML Content to a populated POJO
|
public static final String DATETIMEFORMAT
public static final String DATEFORMAT
@GwtIncompatible protected transient Request<?> request
protected transient String responseContent
@GwtIncompatible protected transient XPath xPath
@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 withpublic String getResponseContent()
@GwtIncompatible protected abstract void transform()
@GwtIncompatible protected Boolean getBoolean(String xPathExpression)
xPathExpression
- @GwtIncompatible protected Date getDate(String xPathExpression)
xPathExpression
- @GwtIncompatible protected Date getDateTime(String xPathExpression)
xPathExpression
- @GwtIncompatible public String getDetailText()
@GwtIncompatible protected Integer[] getIntegerArray(String xPathExpression)
xPathExpression
- @GwtIncompatible protected Node getNode(String xPathExpression)
xPathExpression
- @GwtIncompatible protected Node[] getNodeArray(String xPathExpression)
xPathExpression
- @GwtIncompatible protected Double getNumber(String xPathExpression)
xPathExpression
- @GwtIncompatible public Request<?> getRequest()
@GwtIncompatible protected String getString(String xPathExpression)
xPathExpression
- @GwtIncompatible protected String[] getStringArray(String xPathExpression)
xPathExpression
- @GwtIncompatible public String getSummaryText()
@GwtIncompatible public boolean isCommandType(String commandType)
commandType
- @GwtIncompatible public boolean isErrorResponse()
Copyright © 2016 ECG. All rights reserved.