|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.outerj.xreporter.client.XReporterResponse
This is the response returned by XReporterClient.processRequest(org.outerj.xreporter.client.XReporterRequest)
.
The fields of this object which contain information depend on the type of the response.
The type can be retrieved using the getType()
method and is one of
these constants:
OK | For a 'normal response'. In this case you can call getData()
to get a byte array containing XReporter's XML response. |
LINK | If XReporter answered with a link to somewhere else. In this case
you can call getHref() to get the value of the link. Calling getData() will
return XReporter's XML response as-is. |
APP_ERROR | If an error occured in XReporter. Calling getData() wil
give the error message (as XML). |
ERROR | If an error occured with the connection to XReporter, within the
HTTP stack or with parsing the result. In this case you can call getErrorMessage()
to get a description of the error. Calling getData() will return null. |
Field Summary | |
static short |
APP_ERROR
|
protected byte[] |
data
|
static short |
ERROR
|
protected java.lang.String |
errorMessage
Error messsage in case type = ERROR, otherwise it is null. |
protected java.lang.String |
href
|
static short |
LINK
|
static short |
OK
|
protected java.lang.String |
reportDefinitionId
|
protected java.lang.String |
reportId
|
protected short |
type
|
Constructor Summary | |
XReporterResponse()
|
Method Summary | |
byte[] |
getData()
Returns a byte array containing the XML response. |
java.lang.String |
getErrorMessage()
In case getType() returns ERROR, this will contain a (non-localized) error message, otherwise this returns null. |
java.lang.String |
getHref()
In case getType() returns LINK, this will contain the value of the link, otherwise this will return null. |
java.lang.String |
getReportDefinitionId()
If getType() returns OK, and the request was send to report-resource (/reports/<id&t;/...), this will give the report definition id of the report to which the request was sent. |
java.lang.String |
getReportId()
If getType() returns OK, and the request was send to report-resource (/reports/<id&t;/...), this will give the report instance id of the report to which the request was sent. |
short |
getType()
Returns the type of the response. |
java.lang.String |
getTypeName()
Returns the type of the response as a String. |
void |
setData(byte[] data)
|
void |
setErrorMessage(java.lang.String errorMessage)
|
void |
setHref(java.lang.String href)
|
void |
setReportDefinitionId(java.lang.String reportDefinitionId)
|
void |
setReportId(java.lang.String reportId)
|
void |
setType(short type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected byte[] data
protected short type
protected java.lang.String href
protected java.lang.String errorMessage
public static final short OK
public static final short LINK
public static final short APP_ERROR
public static final short ERROR
protected java.lang.String reportDefinitionId
protected java.lang.String reportId
Constructor Detail |
public XReporterResponse()
Method Detail |
public byte[] getData()
public void setData(byte[] data)
public short getType()
public void setType(short type)
public java.lang.String getHref()
public void setHref(java.lang.String href)
public java.lang.String getErrorMessage()
public void setErrorMessage(java.lang.String errorMessage)
public java.lang.String getTypeName()
public java.lang.String getReportDefinitionId()
public void setReportDefinitionId(java.lang.String reportDefinitionId)
public java.lang.String getReportId()
public void setReportId(java.lang.String reportId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |