Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkjsf.git into...
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / commands / sp / RecordCommandSp.java
diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/sp/RecordCommandSp.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/sp/RecordCommandSp.java
new file mode 100644 (file)
index 0000000..0b40381
--- /dev/null
@@ -0,0 +1,59 @@
+package com.indexdata.mkjsf.pazpar2.commands.sp;\r
+\r
+import java.io.Serializable;\r
+\r
+import com.indexdata.mkjsf.pazpar2.commands.CommandParameter;\r
+import com.indexdata.mkjsf.pazpar2.commands.RecordCommand;\r
+\r
+/**\r
+ * Service Proxy extensions to the Papzar2 <code>record</code> command, \r
+ * these parameters being accessible by <code>pzreq.record.sp.[parameter]</code>\r
+ * \r
+ * @author Niels Erik\r
+ *\r
+ */\r
+public class RecordCommandSp  implements Serializable, ServiceProxyCommand {\r
+\r
+  private static final long serialVersionUID = -3901864271733337221L;\r
+  private RecordCommand command = null;\r
+  \r
+  public RecordCommandSp(RecordCommand command) {    \r
+    this.command = command;\r
+  }\r
+  \r
+  /**\r
+   * Sets Service Proxy command parameter <code>recordquery</code>. See Service Proxy documentation for details. \r
+   */\r
+  public void setRecordquery (String recordQuery) {\r
+    command.setParameter(new CommandParameter("recordquery","=",recordQuery));\r
+  }\r
+  \r
+  /**\r
+   * Gets parameter value for <code>recordquery</cod>\r
+   */\r
+  public String getRecordquery() {\r
+    return command.getParameterValue("recordquery");\r
+  }\r
+  \r
+  /**\r
+   * Sets Service Proxy command parameter <code>acefilter</code>. See Service Proxy documentation for details.\r
+   */\r
+  public void setAcefilter (String aceFilter) {\r
+    command.setParameter(new CommandParameter("acefilter","=",aceFilter));\r
+  }\r
+  \r
+  /**\r
+   * Gets parameter value for <code>acefilter</cod>\r
+   */\r
+  public String getAcefilter () {\r
+    return command.getParameterValue("acefilter");\r
+  }\r
+\r
+  @Override\r
+  public boolean spOnly() {\r
+    return true;\r
+  }\r
+\r
+  \r
+\r
+}\r