Moves Auth response class to SP data package
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / Pz2Bean.java
index 5b45551..29d9280 100644 (file)
@@ -172,17 +172,19 @@ public class Pz2Bean implements Pz2Interface, StateListener, Configurable, Seria
    * Refreshes the data objects listed in 'commands' from pazpar2\r
    * \r
    * @param commands\r
-   * @return Number of activeclients at the time of the 'show' command\r
+   * @return Number of activeclients at the time of the 'show' command,\r
+   *         or 'new' if search was just initiated.\r
    */\r
   public String update (String commands) {\r
     logger.debug("Request to update: " + commands);\r
     try {\r
       if (commands.equals("search")) {\r
         doSearch();\r
-        return "";\r
+        return "new";\r
       } else if (commands.equals("record")) {\r
         return doRecord();\r
       } else if (pzresp.getSearch().isNew()) {\r
+        // For returning notification of 'search started' quickly to UI\r
         logger.info("New search. Marking it old, then returning 'new' to trigger another round-trip.");\r
         pzresp.getSearch().setIsNew(false);\r
         return "new";\r