X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fpz2utils4jsf%2Fpazpar2%2FPz2Interface.java;h=3de5b68ac3e2eca8740ec77a9c7b509141369694;hb=2aa1c4adceb245c1f59f62e9adb77fda9f02291a;hp=6aa1921429f376b19847b62e3c51028e60be8bef;hpb=1724e77234e35c61de392b943730b76771ce5bb3;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/Pz2Interface.java b/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/Pz2Interface.java index 6aa1921..3de5b68 100644 --- a/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/Pz2Interface.java +++ b/src/main/java/com/indexdata/pz2utils4jsf/pazpar2/Pz2Interface.java @@ -1,9 +1,10 @@ package com.indexdata.pz2utils4jsf.pazpar2; +import java.io.Serializable; import java.util.List; import com.indexdata.pz2utils4jsf.controls.ResultsPager; -import com.indexdata.pz2utils4jsf.pazpar2.TargetFilter; +import com.indexdata.pz2utils4jsf.errors.ApplicationError; import com.indexdata.pz2utils4jsf.pazpar2.data.ByTarget; import com.indexdata.pz2utils4jsf.pazpar2.data.RecordResponse; import com.indexdata.pz2utils4jsf.pazpar2.data.ShowResponse; @@ -11,7 +12,7 @@ import com.indexdata.pz2utils4jsf.pazpar2.data.StatResponse; import com.indexdata.pz2utils4jsf.pazpar2.data.TermListsResponse; import com.indexdata.pz2utils4jsf.pazpar2.data.TermResponse; -public interface Pz2Interface { +public interface Pz2Interface extends Serializable { /** * Executes a Pazpar2 search using the given query string @@ -297,4 +298,39 @@ public interface Pz2Interface { * @param key corresponding to browsers hash string */ public void setCurrentStateKey(String key); + + /** + * @return true if any errors encountered so far + */ + public boolean hasErrors(); + + /** + * + * @return true if errors encountered during execution of commands + */ + public boolean hasCommandErrors(); + + /** + * + * @return true if errors encountered when configuring the service + */ + public boolean hasConfigurationErrors(); + + /** + * Returns one (of possibly multiple) errors encountered during execution of commands + * Will prefer to show the search errors - if any - as the search command is usually + * executed first. + * + * @return + */ + public ApplicationError getCommandError(); + + /** + * Returns all errors encountered during configuration of the application, in particular + * the Pazpar2 client. + * + * @return + */ + public List getConfigurationErrors(); + }