+ \r
+ public boolean hasConfigurationErrors () {\r
+ return (configurationErrors.size()>0); \r
+ }\r
+ \r
+ public boolean hasCommandErrors () {\r
+ if (dataObjects.get("search").hasApplicationError()) {\r
+ logger.info("Error detected in search");\r
+ return true;\r
+ }\r
+ for (String name : dataObjects.keySet()) {\r
+ if (dataObjects.get(name).hasApplicationError()) {\r
+ logger.info("Error detected in " + name);\r
+ return true;\r
+ }\r
+ } \r
+ return false; \r
+ }\r
+ \r
+ /**\r
+ * Returns true if application error found in any response data objects \r
+ */\r
+ public boolean hasErrors () {\r
+ return hasConfigurationErrors() || hasCommandErrors();\r
+ }\r
+\r
+ public List<ErrorInterface> getConfigurationErrors() { \r
+ return configurationErrors;\r
+ }\r
+ \r
+ /**\r
+ * Returns a search command error, if any, otherwise the first\r
+ * error found for an arbitrary command, if any, otherwise\r
+ * an empty dummy error. \r
+ */ \r
+ public ErrorInterface getCommandError() {\r
+ CommandError error = new CommandError(); \r
+ if (dataObjects.get("search").hasApplicationError()) {\r
+ error = dataObjects.get("search").getApplicationError(); \r
+ } else {\r
+ for (String name : dataObjects.keySet()) { \r
+ if (dataObjects.get(name).hasApplicationError()) { \r
+ error = dataObjects.get(name).getApplicationError(); \r
+ break;\r
+ } \r
+ }\r
+ }\r
+ error.setErrorHelper(errorHelper);\r
+ return error; \r
+ }\r
+\r