From: Niels Erik G. Nielsen Date: Fri, 28 Jun 2013 15:01:52 +0000 (-0400) Subject: javadoc X-Git-Tag: v0.0.7~24 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=47f00068ba15db82dfac29e07604e64b3fa2e086;p=mkjsf-moved-to-github.git javadoc --- diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/SearchClient.java b/src/main/java/com/indexdata/mkjsf/pazpar2/SearchClient.java index e50d498..7eea44d 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/SearchClient.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/SearchClient.java @@ -6,9 +6,26 @@ import com.indexdata.mkjsf.config.Configurable; import com.indexdata.mkjsf.config.Configuration; import com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command; +/** + * Interface abstracting Pazpar2 and Service Proxy services. + * + * @author Niels Erik + * + */ public interface SearchClient extends Configurable, Serializable { + /** + * Search commands are saved for management purposes, like bootstrapping + * expired sessions and write log statements. + * @param command + */ public void setSearchCommand(Pazpar2Command command); + + /** + * Issues the provided command against the selected Pazpar2 service. + * @param command + * @return + */ public HttpResponseWrapper executeCommand(Pazpar2Command command); // Use cloneMe() method if injecting the client with CDI. @@ -18,9 +35,35 @@ public interface SearchClient extends Configurable, Serializable { // If propagation to threads gets supported, the cloning can go. public SearchClient cloneMe(); + /** + * Basically says if this client accesses a Service Proxy, which (usually) + * requires some form of authentication, or Pazpar2, which don't. + * @return + */ public boolean isAuthenticatingClient(); + + /** + * Returns the current client configuration - mainly for error resolution. + * @return + */ public Configuration getConfiguration(); + + /** + * Returns the URL of the currently selected Pazpar2/SP service + * @return URL as a String + */ public String getServiceUrl(); + + /** + * Sets the URL of the Pazpar2/SP service to use for searching. + * + * @param url + */ public void setServiceUrl(String url); + + /** + * Returns true if a service has been selected, whether by configuration or runtime. + * @return true is service was selected, false otherwise. + */ public boolean hasServiceUrl(); }