1 package com.indexdata.mkjsf.pazpar2.commands;
\r
3 import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;
\r
4 import com.indexdata.mkjsf.pazpar2.state.StateManager;
\r
6 public class InitCommand extends Pazpar2Command implements ServiceProxyCommand {
\r
8 private static final long serialVersionUID = -4915976465898889987L;
\r
10 public InitCommand(StateManager stateMgr) {
\r
11 super("init",stateMgr);
\r
14 public void setClear(String clear) {
\r
15 setParameterInState(new CommandParameter("clear","=",clear));
\r
18 public String getClear() {
\r
19 return getParameterValue("clear");
\r
22 public void setService(String serviceId) {
\r
23 setParameterInState(new CommandParameter("service","=",serviceId));
\r
26 public String getService() {
\r
27 return getParameterValue("service");
\r
31 public void setSession (String sessionId) {
\r
32 throw new UnsupportedOperationException("Cannot set session id on init command");
\r
36 public String getSession () {
\r
37 throw new UnsupportedOperationException("Cannot set or get session id on init command");
\r
40 public InitCommand copy () {
\r
41 InitCommand newCommand = new InitCommand(stateMgr);
\r
42 for (String parameterName : parameters.keySet()) {
\r
43 newCommand.setParameterInState(parameters.get(parameterName).copy());
\r
48 public ServiceProxyCommand getSp() {
\r
53 public boolean spOnly() {
\r