com.indexdata.mkjsf.pazpar2.state
Class Pazpar2State

java.lang.Object
  extended by com.indexdata.mkjsf.pazpar2.state.Pazpar2State

public class Pazpar2State
extends Object

Holds a 'pazpar2 state', understood as a full set of pazpar2 commands and all their parameter settings at a given point in time.

Author:
Niels Erik

Constructor Summary
Pazpar2State()
           
Pazpar2State(Pazpar2State previousState, Pazpar2Command newCommand)
          Creates new state by cloning all commands of the provided state and then overriding one of them with the provided state changing command.
 
Method Summary
 Pazpar2Command getCommand(String name)
          Returns a command from this state
 String getKey()
          Generates a state key that can be used by the browser to pick up this state again at a later point in time.
 boolean stateMutating(Pazpar2Command command)
          Checks if a command represents a change of this state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pazpar2State

public Pazpar2State()

Pazpar2State

public Pazpar2State(Pazpar2State previousState,
                    Pazpar2Command newCommand)
Creates new state by cloning all commands of the provided state and then overriding one of them with the provided state changing command.

Parameters:
previousState -
newCommand -
Method Detail

getKey

public String getKey()
Generates a state key that can be used by the browser to pick up this state again at a later point in time.

Returns:
See Also:
com.indexdata.mkjsf.pazpar2.state.StateManager#setCurrentStateKey}

stateMutating

public boolean stateMutating(Pazpar2Command command)
Checks if a command represents a change of this state

Parameters:
command -
Returns:
true if the command causes a change of state

getCommand

public Pazpar2Command getCommand(String name)
Returns a command from this state

Parameters:
name -
Returns:


Copyright © 2013. All Rights Reserved.