import com.indexdata.mkjsf.config.Configuration;\r
import com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command;\r
\r
+/**\r
+ * Interface abstracting Pazpar2 and Service Proxy services. \r
+ * \r
+ * @author Niels Erik\r
+ *\r
+ */\r
public interface SearchClient extends Configurable, Serializable {\r
\r
+ /**\r
+ * Search commands are saved for management purposes, like bootstrapping\r
+ * expired sessions and write log statements. \r
+ * @param command\r
+ */\r
public void setSearchCommand(Pazpar2Command command);\r
+ \r
+ /**\r
+ * Issues the provided command against the selected Pazpar2 service.\r
+ * @param command\r
+ * @return\r
+ */\r
public HttpResponseWrapper executeCommand(Pazpar2Command command);\r
\r
// Use cloneMe() method if injecting the client with CDI.\r
// If propagation to threads gets supported, the cloning can go.\r
public SearchClient cloneMe();\r
\r
+ /**\r
+ * Basically says if this client accesses a Service Proxy, which (usually)\r
+ * requires some form of authentication, or Pazpar2, which don't.\r
+ * @return\r
+ */\r
public boolean isAuthenticatingClient(); \r
+ \r
+ /**\r
+ * Returns the current client configuration - mainly for error resolution.\r
+ * @return\r
+ */\r
public Configuration getConfiguration();\r
+ \r
+ /**\r
+ * Returns the URL of the currently selected Pazpar2/SP service\r
+ * @return URL as a String\r
+ */\r
public String getServiceUrl();\r
+ \r
+ /**\r
+ * Sets the URL of the Pazpar2/SP service to use for searching. \r
+ * \r
+ * @param url\r
+ */\r
public void setServiceUrl(String url);\r
+ \r
+ /**\r
+ * Returns true if a service has been selected, whether by configuration or runtime. \r
+ * @return true is service was selected, false otherwise.\r
+ */\r
public boolean hasServiceUrl(); \r
}\r