- public Pazpar2State () { \r
- for (String command : Arrays.asList("init","ping","settings","search","stat","show","record","termlist","bytarget")) {\r
- commands.put(command, new Pazpar2Command(command));\r
- }\r
- key = "#initial";\r
+ public Pazpar2State (StateManager mgr) {\r
+ commands.put(Pazpar2Commands.INIT, new InitCommand(mgr));\r
+ commands.put(Pazpar2Commands.PING, new PingCommand(mgr));\r
+ commands.put(Pazpar2Commands.SETTINGS, new SettingsCommand(mgr));\r
+ commands.put(Pazpar2Commands.SEARCH, new SearchCommand(mgr));\r
+ commands.put(Pazpar2Commands.STAT, new StatCommand(mgr));\r
+ commands.put(Pazpar2Commands.SHOW, new ShowCommand(mgr));\r
+ commands.put(Pazpar2Commands.RECORD, new RecordCommand(mgr));\r
+ commands.put(Pazpar2Commands.TERMLIST, new TermlistCommand(mgr));\r
+ commands.put(Pazpar2Commands.BYTARGET, new BytargetCommand(mgr)); \r
+ key = "#1";\r