1 package com.indexdata.mkjsf.pazpar2.commands.sp;
\r
3 import com.indexdata.mkjsf.pazpar2.commands.CommandParameter;
\r
4 import com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command;
\r
5 import com.indexdata.mkjsf.pazpar2.state.StateManager;
\r
7 public class AuthCommand extends Pazpar2Command implements ServiceProxyCommand {
\r
9 private static final long serialVersionUID = 5487611235664162578L;
\r
11 public AuthCommand(StateManager stateMgr) {
\r
12 super("auth", stateMgr);
\r
15 public void setAction (String action) {
\r
16 setParameterInState(new CommandParameter("action","=",action));
\r
19 public String getAction () {
\r
20 return getParameterValue("action");
\r
23 public void setUsername(String username) {
\r
24 setParameterInState(new CommandParameter("username","=",username));
\r
27 public String getUsername () {
\r
28 return getParameterValue("username");
\r
31 public void setPassword (String password) {
\r
32 setParameterInState(new CommandParameter("password","=",password));
\r
35 public String getPassword () {
\r
36 return getParameterValue("password");
\r
39 public AuthCommand copy () {
\r
40 AuthCommand newCommand = new AuthCommand(stateMgr);
\r
41 for (String parameterName : parameters.keySet()) {
\r
42 newCommand.setParameterInState(parameters.get(parameterName).copy());
\r
48 public ServiceProxyCommand getSp() {
\r
53 public boolean spOnly() {
\r