public abstract class Response extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Response.DefaultResponse
A Default Response Container -- Used for simple Success and Error
Responses
|
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[] |
getIntegerList(String xPathExpression)
Get a list 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[] |
getNodeList(String xPathExpression)
Get a list of String 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.
|
protected String |
getString(String xPathExpression)
Get a String element by XPath Expression
|
protected String[] |
getStringList(String xPathExpression)
Get a list 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".
|
boolean |
isSuccessResponse()
Returns true if the "xsi:type" of this response is a "c:SuccessResponse".
|
public static final String DATETIMEFORMAT
public static final String DATEFORMAT
protected transient Request<?> request
protected transient String responseContent
protected transient XPath xPath
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 withprotected Boolean getBoolean(String xPathExpression)
xPathExpression
- protected Date getDate(String xPathExpression)
xPathExpression
- protected Date getDateTime(String xPathExpression)
xPathExpression
- public String getDetailText()
protected Integer[] getIntegerList(String xPathExpression)
xPathExpression
- protected Node getNode(String xPathExpression)
xPathExpression
- protected Node[] getNodeList(String xPathExpression)
xPathExpression
- protected Double getNumber(String xPathExpression)
xPathExpression
- public Request<?> getRequest()
protected String getString(String xPathExpression)
xPathExpression
- protected String[] getStringList(String xPathExpression)
xPathExpression
- public String getSummaryText()
public boolean isCommandType(String commandType)
commandType
- public boolean isErrorResponse()
public boolean isSuccessResponse()
Copyright © 2016 ECG, Inc. All rights reserved.