* 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
import com.indexdata.mkjsf.pazpar2.commands.Pazpar2Commands;\r
import com.indexdata.mkjsf.pazpar2.commands.sp.AuthCommand;\r
import com.indexdata.mkjsf.pazpar2.commands.sp.InitDocUpload;\r
-import com.indexdata.mkjsf.pazpar2.data.AuthResponse;\r
import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;\r
import com.indexdata.mkjsf.pazpar2.data.ResponseParser;\r
import com.indexdata.mkjsf.pazpar2.data.Responses;\r
+import com.indexdata.mkjsf.pazpar2.data.sp.AuthResponse;\r
import com.indexdata.mkjsf.pazpar2.data.sp.CategoriesResponse;\r
import com.indexdata.mkjsf.pazpar2.sp.auth.ServiceProxyUser;\r
import com.indexdata.mkjsf.utils.Utils;\r
+++ /dev/null
-package com.indexdata.mkjsf.pazpar2.data;\r
-\r
-public class AuthResponse extends ResponseDataObject {\r
-\r
- private static final long serialVersionUID = 8006774126022849936L;\r
-\r
- public String getDisplayName () {\r
- return getOneElementValue("displayName");\r
- }\r
- \r
- public String getRealm () {\r
- return getOneElementValue("realm");\r
- }\r
- \r
- public String getStatus () {\r
- return getOneElementValue("status");\r
- }\r
- \r
- public String getAuthenticationType () {\r
- return getOneElementValue("type");\r
- }\r
- \r
-\r
- \r
-}\r
import org.xml.sax.helpers.DefaultHandler;\r
\r
import com.indexdata.mkjsf.pazpar2.ClientCommandResponse;\r
+import com.indexdata.mkjsf.pazpar2.data.sp.AuthResponse;\r
import com.indexdata.mkjsf.pazpar2.data.sp.CategoriesResponse;\r
import com.indexdata.mkjsf.pazpar2.data.sp.TargetCategory;\r
\r
\r
import com.indexdata.mkjsf.errors.ErrorHelper;\r
import com.indexdata.mkjsf.errors.ErrorInterface;\r
+import com.indexdata.mkjsf.pazpar2.data.sp.AuthResponse;\r
import com.indexdata.mkjsf.pazpar2.data.sp.CategoriesResponse;\r
import com.indexdata.mkjsf.utils.Utils;\r
\r
--- /dev/null
+package com.indexdata.mkjsf.pazpar2.data.sp;\r
+\r
+import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;\r
+\r
+public class AuthResponse extends ResponseDataObject {\r
+\r
+ private static final long serialVersionUID = 8006774126022849936L;\r
+\r
+ public String getDisplayName () {\r
+ return getOneElementValue("displayName");\r
+ }\r
+ \r
+ public String getRealm () {\r
+ return getOneElementValue("realm");\r
+ }\r
+ \r
+ public String getStatus () {\r
+ return getOneElementValue("status");\r
+ }\r
+ \r
+ public String getAuthenticationType () {\r
+ return getOneElementValue("type");\r
+ }\r
+ \r
+\r
+ \r
+}\r