Rearranges pz2/sp client logic to isolate error messaging
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / state / StateManager.java
index f150dd8..c7661e0 100644 (file)
@@ -64,15 +64,15 @@ public class StateManager implements Serializable {
    */\r
   public void checkIn(Pazpar2Command command) {\r
     if (getCurrentState().stateMutating(command)) {\r
-      logger.debug("State changed by: " + command.getName());\r
+      logger.debug("State changed by: " + command.getCommandName());\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.getCommandName(),new Boolean(true));      \r
       logger.debug("Updating " + listeners.size() + " listener(s) with state change from " + command);\r
-      updateListeners(command.getName());      \r
+      updateListeners(command.getCommandName());      \r
     } else {\r
-      logger.debug("Command " + command.getName() + " not found to change the state [" + command.getEncodedQueryString() + "]");\r
+      logger.debug("Command " + command.getCommandName() + " not found to change the state [" + command.getEncodedQueryString() + "]");\r
     }\r
   }\r
       \r
@@ -96,7 +96,7 @@ public class StateManager implements Serializable {
     } else {\r
       logger.debug("State key change. Was: [" + currentKey + "]. Will be ["+key+"]");\r
       if (states.get(key)==null) {\r
-        logger.error("The back-end received an unknow state key.");        \r
+        logger.error("The back-end received an unknow state key: ["+ key +"].");        \r
       } else {\r
         if (states.get(key).getCommand("search").equals(states.get(currentKey).getCommand("search"))) {\r
           logger.debug("No search change detected");\r