javadoc
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / Pz2Service.java
index 734d177..4d6d05f 100644 (file)
@@ -45,9 +45,9 @@ import com.indexdata.mkjsf.utils.Utils;
  * transparent to the UI that they are retrieved through this object.\r
  * </p>\r
  * <p>\r
- * Pz2Service is exposed to the UI as 'pz2'. However, if the service is pre-configured, \r
- * the Faces pages might never need to reference 'pz2' explicitly. Indirectly they UI will, \r
- * though, if the polling mechanism in the tag &lt;pz2utils:pz2watch&gt; is used.\r
+ * Pz2Service is exposed to the UI as <code>pz2</code>. However, if the service is pre-configured, \r
+ * the Faces pages might never need to reference <code>pz2</code> explicitly. Indirectly they will, \r
+ * though, if the polling mechanism in the tag <code>&lt;pz2utils:pz2watch&gt;</code> is used.\r
  * \r
  * \r
  **/ \r
@@ -178,7 +178,7 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
      \r
   \r
   /**\r
-   * Updates display data objects by simultaneously issuing the following pazpar2 commands: \r
+   * Updates display data objects by simultaneously issuing the following Pazpar2 commands: \r
    * 'show', 'stat', 'termlist' and 'bytarget'. \r
    * <p>\r
    * If there are outstanding changes to the search command, a search\r
@@ -232,7 +232,7 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
    * Simultaneously refreshes the data objects listed in 'commands' from pazpar2, potentially running a\r
    * search or a record command first if any of these two commands have outstanding parameter changes.\r
    * \r
-   * @param commands comma separated list of Pazpar2 commands to execute\r
+   * @param commands, a comma-separated list of Pazpar2 commands to execute\r
    * \r
    * @return Number of activeclients at the time of the 'show' command,\r
    *         or 'new' if search was just initiated.\r
@@ -322,6 +322,9 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
     }\r
   }\r
       \r
+  /**\r
+   * Used by the state manager to notify Pz2Service about state changes\r
+   */\r
   @Override\r
   public void stateUpdated(String commandName) {\r
     logger.debug("State change reported for [" + commandName + "]");\r
@@ -413,12 +416,21 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
     return pager;\r
   }\r
      \r
+  /**\r
+   * Sets the URL of the Service Proxy to use for requests\r
+   * \r
+   * @param url\r
+   */\r
   public void setServiceProxyUrl(String url) {\r
     searchClient = spClient;\r
     setServiceType(SERVICE_TYPE_SP);\r
     setServiceUrl(url);\r
   }\r
   \r
+  /**\r
+   * Returns the Service Proxy URL currently defined for servicing requests\r
+   * \r
+   */\r
   public String getServiceProxyUrl () {\r
     if (isServiceProxyService()) {\r
       return spClient.getServiceUrl();\r
@@ -426,13 +438,22 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
       return "";\r
     }\r
   }\r
-  \r
+\r
+  /**\r
+   * Sets the URL of the Pazpar2 to use for requests\r
+   * \r
+   * @param url\r
+   */\r
   public void setPazpar2Url(String url) {\r
     searchClient = pz2Client;\r
     setServiceType(SERVICE_TYPE_PZ2);\r
     setServiceUrl(url);\r
   }\r
   \r
+  /**\r
+   * Returns the Pazpar2 URL currently defined for servicing requests\r
+   * \r
+   */  \r
   public String getPazpar2Url() {\r
     if (isPazpar2Service()) {\r
       return pz2Client.getServiceUrl();\r
@@ -441,6 +462,12 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
     }\r
   }\r
 \r
+  /**\r
+   * Sets the URL to be used by the currently selected search client \r
+   * when running requests. \r
+   * \r
+   * @param url\r
+   */\r
   public void setServiceUrl(String url) {\r
     if (url!=null && searchClient != null && !url.equals(searchClient.getServiceUrl())) {\r
       pzreq.getRecord().removeParametersInState();\r
@@ -450,6 +477,10 @@ public class Pz2Service implements StateListener, Configurable, Serializable {
     }    \r
   }\r
   \r
+  /**\r
+   * Gets the currently selected URL used for executing requests. \r
+   * @return\r
+   */\r
   public String getServiceUrl() {\r
     return (searchClient!=null ? searchClient.getServiceUrl() : "");\r
   }\r