Adds windowid parameter to applicable commands
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / commands / sp / RecordCommandSp.java
1 package com.indexdata.mkjsf.pazpar2.commands.sp;\r
2 \r
3 import java.io.Serializable;\r
4 \r
5 import com.indexdata.mkjsf.pazpar2.commands.CommandParameter;\r
6 import com.indexdata.mkjsf.pazpar2.commands.RecordCommand;\r
7 \r
8 /**\r
9  * Service Proxy extensions to the Papzar2 <code>record</code> command, \r
10  * these parameters being accessible by <code>pzreq.record.sp.[parameter]</code>\r
11  * \r
12  * @author Niels Erik\r
13  *\r
14  */\r
15 public class RecordCommandSp  implements Serializable, ServiceProxyCommand {\r
16 \r
17   private static final long serialVersionUID = -3901864271733337221L;\r
18   private RecordCommand command = null;\r
19   \r
20   public RecordCommandSp(RecordCommand command) {    \r
21     this.command = command;\r
22   }\r
23   \r
24   /**\r
25    * Sets Service Proxy command parameter <code>recordquery</code>. See Service Proxy documentation for details. \r
26    */\r
27   public void setRecordquery (String recordQuery) {\r
28     command.setParameter(new CommandParameter("recordquery","=",recordQuery));\r
29   }\r
30   \r
31   /**\r
32    * Gets parameter value for <code>recordquery</cod>\r
33    */\r
34   public String getRecordquery() {\r
35     return command.getParameterValue("recordquery");\r
36   }\r
37   \r
38   /**\r
39    * Sets Service Proxy command parameter <code>acefilter</code>. See Service Proxy documentation for details.\r
40    */\r
41   public void setAcefilter (String aceFilter) {\r
42     command.setParameter(new CommandParameter("acefilter","=",aceFilter));\r
43   }\r
44   \r
45   /**\r
46    * Gets parameter value for <code>acefilter</cod>\r
47    */\r
48   public String getAcefilter () {\r
49     return command.getParameterValue("acefilter");\r
50   }\r
51   \r
52   /**\r
53    * Sets the <code>windowid</code> parameter. See Service Proxy documentation for details.\r
54    */  \r
55   public void setWindowid (String windowid) {\r
56     command.setParameterInState(new CommandParameter("windowid","=",windowid));\r
57   }\r
58   \r
59   /** \r
60    * Returns the <code>windowid</code> parameter value.\r
61    */\r
62   public String getWindowid () {\r
63     return command.getParameterValue("windowid");\r
64   }\r
65 \r
66 \r
67   @Override\r
68   public boolean spOnly() {\r
69     return true;\r
70   }\r
71 \r
72   \r
73 \r
74 }\r