String textContent = "";\r
CommandError error = null;\r
String xml = null;\r
+ boolean isBinary = false;\r
+ byte[] binary = null;\r
\r
public void setType (String type) {\r
this.type = type;\r
return (CommandError) getOneElement("applicationerror");\r
}\r
\r
- public boolean hasPazpar2Error() {\r
- return hasApplicationError() && getApplicationError().hasPazpar2Error();\r
+ public boolean hasServiceError() {\r
+ return hasApplicationError() \r
+ && getApplicationError().isServiceError(); \r
}\r
\r
+ public ServiceError getServiceError() {\r
+ return (hasServiceError()? getApplicationError().getServiceError() : null);\r
+ }\r
+ \r
public void setXml(String xml) {\r
this.xml = xml; \r
}\r
}\r
\r
public boolean getHasResults () {\r
- return (xml != null && xml.length()>0);\r
+ return (xml != null && xml.length()>0) || (getIsBinary() && binary.length>0);\r
+ }\r
+ \r
+ public boolean getIsBinary () {\r
+ return isBinary;\r
+ }\r
+ \r
+ public void setBinary(byte[] bytes) {\r
+ isBinary = true;\r
+ binary = bytes;\r
}\r
+ \r
+ public byte[] getBinary () {\r
+ return binary;\r
+ }\r
+ \r
+ \r
\r
}\r