Adds check for SP only commands.
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / commands / InitCommand.java
index 144a1a7..3166168 100644 (file)
@@ -15,10 +15,18 @@ public class InitCommand extends Pazpar2Command implements ServiceProxyCommand {
     setParameterInState(new CommandParameter("clear","=",clear));\r
   }\r
   \r
+  public String getClear() {\r
+    return getParameterValue("clear");\r
+  }\r
+  \r
   public void setService(String serviceId) {    \r
     setParameterInState(new CommandParameter("service","=",serviceId));\r
   }\r
   \r
+  public String getService() {\r
+    return getParameterValue("service");\r
+  }\r
+  \r
   @Override\r
   public void setSession (String sessionId) {\r
     throw new UnsupportedOperationException("Cannot set session id on init command");\r
@@ -41,5 +49,10 @@ public class InitCommand extends Pazpar2Command implements ServiceProxyCommand {
     return this;\r
   }\r
 \r
+  @Override\r
+  public boolean spOnly() {\r
+    return false;\r
+  }\r
+\r
 \r
 }\r