package com.indexdata.mkjsf.pazpar2.commands;\r
\r
+import com.indexdata.mkjsf.pazpar2.commands.sp.BytargetCommandSp;\r
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;\r
\r
/**\r
}\r
\r
public ServiceProxyCommand getSp() {\r
- return this;\r
+ return new BytargetCommandSp(this);\r
}\r
\r
@Override\r
newCommand.setParameterInState(parameters.get(parameterName).copy()); \r
}\r
newCommand.spCommand = new InitCommandSp(this);\r
- newCommand.spCommand.setUploadedInitDoc(spCommand.getUploadedInitDoc());\r
+ if (spCommand.getUploadedInitDoc()!=null) {\r
+ newCommand.spCommand.setUploadedInitDoc(spCommand.getUploadedInitDoc());\r
+ }\r
return newCommand;\r
}\r
\r
import org.apache.log4j.Logger;\r
\r
import com.indexdata.mkjsf.pazpar2.Pz2Service;\r
+import com.indexdata.mkjsf.pazpar2.commands.sp.SearchCommandSp;\r
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;\r
import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;\r
\r
* Returns the <code>limit</code> parameter value.\r
*/\r
public String getLimit () {\r
- return getParameter("limit") == null ? null : ((FilterParameter)getParameter("limit")).getValueWithExpressions(); \r
+ return getParameter("limit") == null ? null : ((LimitParameter)getParameter("limit")).getValueWithExpressions(); \r
}\r
\r
/**\r
\r
@Override\r
public ServiceProxyCommand getSp() {\r
- return this;\r
+ return new SearchCommandSp(this);\r
}\r
\r
@Override\r
package com.indexdata.mkjsf.pazpar2.commands;\r
\r
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;\r
+import com.indexdata.mkjsf.pazpar2.commands.sp.ShowCommandSp;\r
\r
\r
/**\r
\r
@Override\r
public ServiceProxyCommand getSp() {\r
- return this;\r
+ return new ShowCommandSp(this);\r
}\r
\r
@Override\r
package com.indexdata.mkjsf.pazpar2.commands;\r
\r
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;\r
+import com.indexdata.mkjsf.pazpar2.commands.sp.StatCommandSp;\r
\r
/**\r
* Represents a Pazpar2 <code>stat</code> command, can be accessed by <code>pzreq.state</code>\r
\r
@Override\r
public ServiceProxyCommand getSp() {\r
- return this;\r
+ return new StatCommandSp(this);\r
}\r
\r
@Override\r
--- /dev/null
+package com.indexdata.mkjsf.pazpar2.commands.sp;\r
+\r
+import java.io.Serializable;\r
+\r
+import com.indexdata.mkjsf.pazpar2.commands.BytargetCommand;\r
+import com.indexdata.mkjsf.pazpar2.commands.CommandParameter;\r
+\r
+public class BytargetCommandSp implements Serializable, ServiceProxyCommand {\r
+\r
+ private BytargetCommand command = null;\r
+ private static final long serialVersionUID = -1742198227615699037L;\r
+\r
+ public BytargetCommandSp(BytargetCommand command) {\r
+ this.command = command;\r
+ }\r
+\r
+ /**\r
+ * Sets the <code>windowid</code> parameter. See Service Proxy documentation for details.\r
+ */ \r
+ public void setWindowid (String windowid) {\r
+ command.setParameterInState(new CommandParameter("windowid","=",windowid));\r
+ }\r
+ \r
+ /** \r
+ * Returns the <code>windowid</code> parameter value.\r
+ */\r
+ public String getWindowid () {\r
+ return command.getParameterValue("windowid");\r
+ }\r
+\r
+ @Override\r
+ public boolean spOnly() {\r
+ // TODO Auto-generated method stub\r
+ return false;\r
+ }\r
+\r
+}\r
import com.indexdata.mkjsf.pazpar2.Pz2Service;\r
import com.indexdata.mkjsf.pazpar2.commands.CommandParameter;\r
import com.indexdata.mkjsf.pazpar2.commands.InitCommand;\r
-import com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command;\r
import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;\r
import com.indexdata.mkjsf.pazpar2.data.ResponseParser;\r
import com.indexdata.mkjsf.pazpar2.data.sp.SpResponseDataObject;\r
\r
public UploadedFile getUploadedInitDoc () {\r
logger.info("initDocUpload is: " + initDocUpload );\r
- logger.info("initDocUpload.getUploadedFile() is: " +initDocUpload.getUploadedFile());\r
+ if (initDocUpload != null) {\r
+ logger.info("initDocUpload.getUploadedFile() is: " +initDocUpload.getUploadedFile()); \r
return initDocUpload.getUploadedFile();\r
+ } else {\r
+ return null;\r
+ }\r
}\r
\r
public void downloadInitDoc () throws IOException {\r
public String getAcefilter () {\r
return command.getParameterValue("acefilter");\r
}\r
+ \r
+ /**\r
+ * Sets the <code>windowid</code> parameter. See Service Proxy documentation for details.\r
+ */ \r
+ public void setWindowid (String windowid) {\r
+ command.setParameterInState(new CommandParameter("windowid","=",windowid));\r
+ }\r
+ \r
+ /** \r
+ * Returns the <code>windowid</code> parameter value.\r
+ */\r
+ public String getWindowid () {\r
+ return command.getParameterValue("windowid");\r
+ }\r
+\r
\r
@Override\r
public boolean spOnly() {\r
--- /dev/null
+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.SearchCommand;\r
+\r
+public class SearchCommandSp implements Serializable, ServiceProxyCommand {\r
+\r
+ private SearchCommand command = null;\r
+ private static final long serialVersionUID = -8945477254342198735L;\r
+\r
+ public SearchCommandSp(SearchCommand command) {\r
+ this.command=command;\r
+ }\r
+\r
+ /**\r
+ * Sets the <code>windowid</code> parameter. See Service Proxy documentation for details.\r
+ */ \r
+ public void setWindowid (String windowid) {\r
+ command.setParameterInState(new CommandParameter("windowid","=",windowid));\r
+ }\r
+ \r
+ /** \r
+ * Returns the <code>windowid</code> parameter value.\r
+ */\r
+ public String getWindowid () {\r
+ return command.getParameterValue("windowid");\r
+ }\r
+\r
+ @Override\r
+ public boolean spOnly() {\r
+ return false;\r
+ }\r
+\r
+}\r
--- /dev/null
+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.ShowCommand;\r
+\r
+public class ShowCommandSp implements Serializable, ServiceProxyCommand{\r
+\r
+ ShowCommand command = null;\r
+ /**\r
+ * \r
+ */\r
+ private static final long serialVersionUID = -4563427833820559878L;\r
+\r
+ public ShowCommandSp(ShowCommand showCommand) {\r
+ this.command=showCommand;\r
+ }\r
+ \r
+ /**\r
+ * Sets the <code>windowid</code> parameter. See Service Proxy documentation for details.\r
+ */ \r
+ public void setWindowid (String windowid) {\r
+ command.setParameterInState(new CommandParameter("windowid","=",windowid));\r
+ }\r
+ \r
+ /** \r
+ * Returns the <code>windowid</code> parameter value.\r
+ */\r
+ public String getWindowid () {\r
+ return command.getParameterValue("windowid");\r
+ }\r
+\r
+\r
+ @Override\r
+ public boolean spOnly() {\r
+ return false;\r
+ }\r
+\r
+}\r
--- /dev/null
+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.StatCommand;\r
+\r
+public class StatCommandSp implements Serializable, ServiceProxyCommand {\r
+\r
+ private StatCommand command = null;\r
+ private static final long serialVersionUID = -469324132819092701L;\r
+\r
+ public StatCommandSp(StatCommand command) {\r
+ this.command = command;\r
+ }\r
+\r
+ /**\r
+ * Sets the <code>windowid</code> parameter. See Service Proxy documentation for details.\r
+ */ \r
+ public void setWindowid (String windowid) {\r
+ command.setParameterInState(new CommandParameter("windowid","=",windowid));\r
+ }\r
+ \r
+ /** \r
+ * Returns the <code>windowid</code> parameter value.\r
+ */\r
+ public String getWindowid () {\r
+ return command.getParameterValue("windowid");\r
+ }\r
+\r
+ public boolean spOnly() {\r
+ return false;\r
+ }\r
+\r
+}\r
--- /dev/null
+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.TermlistCommand;\r
+\r
+public class TermlistCommandSp implements Serializable, ServiceProxyCommand {\r
+\r
+ private TermlistCommand command = null;\r
+ private static final long serialVersionUID = -7453670169089123800L;\r
+\r
+ public TermlistCommandSp(TermlistCommand command) {\r
+ this.command = command;\r
+ }\r
+ \r
+ /**\r
+ * Sets the <code>windowid</code> parameter. See Service Proxy documentation for details.\r
+ */ \r
+ public void setWindowid (String windowid) {\r
+ command.setParameterInState(new CommandParameter("windowid","=",windowid));\r
+ }\r
+ \r
+ /** \r
+ * Returns the <code>windowid</code> parameter value.\r
+ */\r
+ public String getWindowid () {\r
+ return command.getParameterValue("windowid");\r
+ }\r
+\r
+\r
+ @Override\r
+ public boolean spOnly() {\r
+ // TODO Auto-generated method stub\r
+ return false;\r
+ }\r
+\r
+}\r