com.indexdata.mkjsf.pazpar2.commands.sp
Class AuthCommand

java.lang.Object
  extended by com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command
      extended by com.indexdata.mkjsf.pazpar2.commands.sp.AuthCommand
All Implemented Interfaces:
ServiceProxyCommand, Serializable

public class AuthCommand
extends Pazpar2Command
implements ServiceProxyCommand

Represents a Service Proxy auth command, can be accessed by pzreq.sp.auth

Authenticates a user against a Pazpar2 Service Proxy

Author:
Niels Erik
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command
name, parameters
 
Constructor Summary
AuthCommand()
           
 
Method Summary
 AuthCommand copy()
          Commands must implement this method to provide an completely detached, deep clone of themselves.
 String getAction()
          Gets parameter value for action
 String getPassword()
          Gets parameter value for password
 ServiceProxyCommand getSp()
          Implementing classes must provide their Service Proxy extension command if any extension parameters exists, or -- just to be polite -- 'this' if there is no Service Proxy extension to the given command.
 String getUsername()
          Gets parameter value for username
 SpResponseDataObject run()
          Executes the command with the currently selected parameters against the currently selected Pazpar2 service
 void setAction(String action)
          Sets Service Proxy command parameter action.
 void setPassword(String password)
          Sets Service Proxy command parameter password.
 void setUsername(String username)
          Sets Service Proxy command parameter username.
 boolean spOnly()
          Here implementing commands publish whether they only apply to the Service Proxy or can be executed against straight Pazpar2 as well.
 
Methods inherited from class com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command
addExpression, checkInState, equals, getCommandName, getEncodedQueryString, getParameter, getParameterValue, getSession, getValueWithExpressions, hashCode, hasParameters, hasParameterValue, removeExpression, removeExpressions, removeExpressionsAfter, removeParameter, removeParameters, removeParametersInState, run, runWith, setCommandName, setParameter, setParameterInState, setParameters, setParametersInState, setSession, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthCommand

public AuthCommand()
Method Detail

run

public SpResponseDataObject run()
Description copied from class: Pazpar2Command
Executes the command with the currently selected parameters against the currently selected Pazpar2 service

Overrides:
run in class Pazpar2Command
Returns:
Response data object based on the Pazpar2 service response.

setAction

public void setAction(String action)
Sets Service Proxy command parameter action. See Service Proxy documentation for details.


getAction

public String getAction()
Gets parameter value for action


setUsername

public void setUsername(String username)
Sets Service Proxy command parameter username. See Service Proxy documentation for details.


getUsername

public String getUsername()
Gets parameter value for username


setPassword

public void setPassword(String password)
Sets Service Proxy command parameter password. See Service Proxy documentation for details.


getPassword

public String getPassword()
Gets parameter value for password


copy

public AuthCommand copy()
Description copied from class: Pazpar2Command
Commands must implement this method to provide an completely detached, deep clone of themselves. The clone is needed by the state manager to transfer commands with current setting from one state to the next. Whenever a non-standard attribute is added to a command class, the copy method must be updated to ensure that the new attribute is brought over as well.

Specified by:
copy in class Pazpar2Command
Returns:
a Pazpar2 command of the given type

getSp

public ServiceProxyCommand getSp()
Description copied from class: Pazpar2Command
Implementing classes must provide their Service Proxy extension command if any extension parameters exists, or -- just to be polite -- 'this' if there is no Service Proxy extension to the given command.

Specified by:
getSp in class Pazpar2Command
Returns:

spOnly

public boolean spOnly()
Description copied from class: Pazpar2Command
Here implementing commands publish whether they only apply to the Service Proxy or can be executed against straight Pazpar2 as well. This is convenient for a UI that switches between service types either deployment time or run time.

Specified by:
spOnly in interface ServiceProxyCommand
Specified by:
spOnly in class Pazpar2Command
Returns:
false if the command applies to straight Pazpar2


Copyright © 2013. All Rights Reserved.