From 28b5abb240eda1749703712a0ba19a5843f84ebc Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Wed, 24 Apr 2013 17:13:04 -0400 Subject: [PATCH] Do record despite no previous search IF it has recordquery. And defaults UI accessible serviceProxyUrl from config --- src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java | 4 ++-- src/main/java/com/indexdata/mkjsf/pazpar2/Pz2ProxyBean.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java index d617f14..98f4c71 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2Bean.java @@ -112,7 +112,7 @@ public class Pz2Bean implements Pz2Interface, StateListener, Serializable { public String update (String commands) { if (! errors.hasConfigurationErrors()) { if (commandsAreValid(commands)) { - if (hasQuery()) { + if (hasQuery() || (commands.equals("record") && pzreq.getCommand("record").hasParameterSet("recordquery"))) { handleQueryStateChanges(commands); logger.debug("Processing request for " + commands); List threadList = new ArrayList(); @@ -137,7 +137,7 @@ public class Pz2Bean implements Pz2Interface, StateListener, Serializable { Pazpar2ResponseData responseObject = Pazpar2ResponseParser.getParser().getDataObject(response); pzresp.put(commandName, responseObject); } - if (commands.equals("record")) { + if (commands.equals("record")) { logger.debug("Record: Active clients: "+pzresp.getRecord().getActiveClients()); return pzresp.getRecord().getActiveClients(); } else { diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2ProxyBean.java b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2ProxyBean.java index 4209aa2..6e74ed0 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2ProxyBean.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/Pz2ProxyBean.java @@ -41,6 +41,7 @@ public class Pz2ProxyBean extends Pz2Bean implements ServiceProxyInterface { + Utils.objectId(configurator) + "]" ); configureClient(searchClient,configurator); stateMgr.addStateListener(this); + serviceProxyUrl = searchClient.getConfiguration().get(ServiceProxyClient.SERVICE_PROXY_URL); } else { logger.debug("Pz2ProxyBean:postConstruct: searchClient already instantiated " + "during construction of parent object Pz2Bean."); -- 1.7.10.4