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.ErrorInterface;\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
*/\r
public void setFacetOnQuery(String facetKey, String term);\r
\r
+ \r
+ public void setFilter(String filterExpression);\r
+ \r
+ public String getFilter();\r
+\r
+ \r
/**\r
- * Adds a target filter to limit the current query by, then\r
- * executes the current search.\r
+ * Adds a single target filter to restrict the current query by, \r
+ * then executes the current search.\r
+ * \r
+ * This is a special case of the general setFilter function, \r
+ * allowing to associate a descriptive target name with the \r
+ * filter expression for display in UI. \r
* \r
* @param targetId pazpar2's ID for the target to limit by\r
* @param targetName a descriptive name for the target\r
*/\r
- public void setTargetFilter (String targetId, String targetName);\r
+ public void setSingleTargetFilter (String targetId, String targetName);\r
\r
/**\r
* Removes the current target filter from the search\r
* \r
*/\r
- public void removeTargetFilter ();\r
+ public void removeSingleTargetFilter ();\r
\r
/**\r
* \r
* @return The target filter set on the current search command\r
*/\r
- public TargetFilter getTargetFilter();\r
+ public SingleTargetFilter getSingleTargetFilter();\r
\r
/**\r
* Resolves if the current search command has a target filter - to\r
* @return true if the current search command is limited by a target \r
* filter\r
*/\r
- public boolean hasTargetFilter();\r
- \r
+ public boolean hasSingleTargetFilter();\r
+ \r
/**\r
* Sets the ordering of records (hits) in the 'show' display object\r
*/\r
* @return pazpar2 'show' response object\r
*/\r
public ShowResponse getShow();\r
- \r
+ \r
/**\r
* Returns the 'stat' data as retrieved from pazpar2 by the most \r
* recent update request\r
*/\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
+ * \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 ErrorInterface 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<ErrorInterface> getConfigurationErrors();\r
+\r
+ void setRecordId(String recId);\r
+\r
+ String getRecordId();\r
+ \r
}\r