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 void setService(String serviceId) {
\r
19 setParameterInState(new CommandParameter("service","=",serviceId));
\r
23 public void setSession (String sessionId) {
\r
24 throw new UnsupportedOperationException("Cannot set session id on init command");
\r
28 public String getSession () {
\r
29 throw new UnsupportedOperationException("Cannot set or get session id on init command");
\r
32 public InitCommand copy () {
\r
33 InitCommand newCommand = new InitCommand(stateMgr);
\r
34 for (String parameterName : parameters.keySet()) {
\r
35 newCommand.setParameterInState(parameters.get(parameterName).copy());
\r
40 public ServiceProxyCommand getSp() {
\r