\r
private void updateListeners (String command) {\r
for (StateListener lsnr : listeners) {\r
- lsnr.stateUpdate(command);\r
+ lsnr.stateUpdated(command);\r
}\r
}\r
\r
Pazpar2State state = new Pazpar2State(getCurrentState(),command);\r
states.put(state.getKey(), state);\r
currentKey = state.getKey();\r
- hasPendingStateChange(command.getName(),new Boolean(true));\r
+ hasPendingStateChange(command.getName(),new Boolean(true)); \r
+ logger.debug("Updating listeners with state change from " + command);\r
+ updateListeners(command.getName()); \r
} else {\r
logger.debug("Command " + command.getName() + " not found to change the state [" + command.getEncodedQueryString() + "]");\r
}\r
logger.debug("Getting " + commandName + " from state manager.");\r
return getCurrentState().getCommand(commandName).copy();\r
}\r
- \r
+ \r
public CommandReadOnly getCommand (String commandName) {\r
return getCurrentState().getCommand(commandName);\r
}\r
*/\r
public void hasPendingStateChange(String command, boolean bool) {\r
pendingStateChanges.put(command, new Boolean(bool));\r
- if (bool) {\r
- logger.debug("Updating listeners with state change from " + command);\r
- updateListeners(command);\r
- }\r
}\r
\r
/**\r