Work in progress on error detect,report,troubleshoot
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / pazpar2 / Pz2Interface.java
index d7fb64c..3de5b68 100644 (file)
@@ -4,8 +4,7 @@ import java.io.Serializable;
 import java.util.List;\r
 \r
 import com.indexdata.pz2utils4jsf.controls.ResultsPager;\r
-import com.indexdata.pz2utils4jsf.pazpar2.TargetFilter;\r
-import com.indexdata.pz2utils4jsf.pazpar2.data.ApplicationError;\r
+import com.indexdata.pz2utils4jsf.errors.ApplicationError;\r
 import com.indexdata.pz2utils4jsf.pazpar2.data.ByTarget;\r
 import com.indexdata.pz2utils4jsf.pazpar2.data.RecordResponse;\r
 import com.indexdata.pz2utils4jsf.pazpar2.data.ShowResponse;\r
@@ -300,8 +299,38 @@ public interface Pz2Interface extends Serializable {
    */\r
   public void setCurrentStateKey(String key);\r
   \r
+  /** \r
+   * @return true if any errors encountered so far\r
+   */\r
   public boolean hasErrors();\r
-      \r
-  public ApplicationError getOneError();\r
+  \r
+  /**\r
+   * \r
+   * @return true if errors encountered during execution of commands\r
+   */\r
+  public boolean hasCommandErrors();\r
+  \r
+  /**\r
+   * \r
+   * @return true if errors encountered when configuring the service\r
+   */\r
+  public boolean hasConfigurationErrors();\r
+  \r
+  /**\r
+   * Returns one (of possibly multiple) errors encountered during execution of commands\r
+   * Will prefer to show the search errors - if any - as the search command is usually \r
+   * executed first.  \r
+   * \r
+   * @return\r
+   */\r
+  public ApplicationError getCommandError();\r
+  \r
+  /**\r
+   * Returns all errors encountered during configuration of the application, in particular\r
+   * the Pazpar2 client. \r
+   * \r
+   * @return\r
+   */\r
+  public List<ApplicationError> getConfigurationErrors();\r
    \r
 }\r