From 47f00068ba15db82dfac29e07604e64b3fa2e086 Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Fri, 28 Jun 2013 11:01:52 -0400 Subject: [PATCH] javadoc --- .../com/indexdata/mkjsf/pazpar2/SearchClient.java | 43 ++++++++++++++++++++ 1 file changed, 43 insertions(+) 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(); } -- 1.7.10.4