X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fstate%2FPazpar2State.java;h=b5b1d3ead4a94875aadfe2b33c372963f02187ce;hb=ea49f38ba51c8325879b693536940974b73a01c2;hp=015c1be781709955f11bb45e5d1c555937ad2570;hpb=b9c65ec6cefe23341e4ae9ea4e6c6f9d9d7ed495;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java b/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java index 015c1be..b5b1d3e 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/state/Pazpar2State.java @@ -28,21 +28,23 @@ import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommands; public class Pazpar2State { String key = null; - Map commands = new HashMap();; + Map commands = new HashMap(); - public Pazpar2State (StateManager mgr) { - commands.put(Pazpar2Commands.INIT, new InitCommand(mgr)); - commands.put(Pazpar2Commands.PING, new PingCommand(mgr)); - commands.put(Pazpar2Commands.SETTINGS, new SettingsCommand(mgr)); - commands.put(Pazpar2Commands.SEARCH, new SearchCommand(mgr)); - commands.put(Pazpar2Commands.STAT, new StatCommand(mgr)); - commands.put(Pazpar2Commands.SHOW, new ShowCommand(mgr)); - commands.put(Pazpar2Commands.RECORD, new RecordCommand(mgr)); - commands.put(Pazpar2Commands.TERMLIST, new TermlistCommand(mgr)); - commands.put(Pazpar2Commands.BYTARGET, new BytargetCommand(mgr)); + public Pazpar2State () { + + commands.put(Pazpar2Commands.INIT, new InitCommand()); + commands.put(Pazpar2Commands.PING, new PingCommand()); + commands.put(Pazpar2Commands.SETTINGS, new SettingsCommand()); + commands.put(Pazpar2Commands.SEARCH, new SearchCommand()); + commands.put(Pazpar2Commands.STAT, new StatCommand()); + commands.put(Pazpar2Commands.SHOW, new ShowCommand()); + commands.put(Pazpar2Commands.RECORD, new RecordCommand()); + commands.put(Pazpar2Commands.TERMLIST, new TermlistCommand()); + commands.put(Pazpar2Commands.BYTARGET, new BytargetCommand()); - commands.put(ServiceProxyCommands.AUTH, new AuthCommand(mgr)); - commands.put(ServiceProxyCommands.CATEGORIES, new CategoriesCommand(mgr)); + commands.put(ServiceProxyCommands.AUTH, new AuthCommand()); + commands.put(ServiceProxyCommands.CATEGORIES, new CategoriesCommand()); + // key = "#1"; } @@ -58,13 +60,14 @@ public class Pazpar2State { this.commands.put(commandName, previousState.commands.get(commandName).copy()); } this.commands.put(newCommand.getCommandName(),newCommand); - this.key = getKey(); + this.key = getKey(); } /** * Generates a state key that can be used by the browser to pick * up this state again at a later point in time. * + * @see {@link com.indexdata.mkjsf.pazpar2.state.StateManager#setCurrentStateKey} * @return */ public String getKey() {