Fixes vararg issue in Glassfish EL
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / commands / Pazpar2Command.java
index 99b330e..0a609c6 100644 (file)
@@ -85,9 +85,11 @@ public abstract class Pazpar2Command implements Serializable  {
    * \r
    * @return Response data object based on the Pazpar2 service response\r
    */\r
-  public ResponseDataObject runWith(String... parameters) {\r
-    for (String parameter : parameters) {\r
-      StringTokenizer tokenizer = new StringTokenizer(parameter,"=");\r
+  public ResponseDataObject runWith(String parameters) {\r
+    StringTokenizer expressions = new StringTokenizer(parameters,";");\r
+    while (expressions.hasMoreTokens()) {\r
+      String expression = expressions.nextToken();\r
+      StringTokenizer tokenizer = new StringTokenizer(expression,"=");\r
       String name = (String) tokenizer.nextElement();\r
       String value = (String) tokenizer.nextElement();\r
       CommandParameter commandParameter = new CommandParameter(name,"=",value);\r
@@ -95,7 +97,7 @@ public abstract class Pazpar2Command implements Serializable  {
     }\r
     return run();\r
   }\r
-  \r
+    \r
   /**\r
    * Executes the command in a thread.  \r
    * \r
@@ -334,10 +336,10 @@ public abstract class Pazpar2Command implements Serializable  {
   public abstract ServiceProxyCommand getSp();\r
      \r
   /**\r
-   * Implementing commands publishes whether they only \r
-   * apply to the Service Proxy - or can be executed \r
-   * against straight Pazpar2 as well. Convenient for a \r
-   * UI that switches between service types - whether \r
+   * Here implementing commands publish whether they only \r
+   * apply to the Service Proxy or can be executed \r
+   * against straight Pazpar2 as well. This is convenient for a \r
+   * UI that switches between service types either \r
    * deployment time or run time.\r
    *   \r
    * @return false if the command applies to straight Pazpar2\r