// To avoid that, a context free client is cloned from the context \r
// dependent one. \r
// If propagation to threads gets supported, the cloning can go. \r
- this.searchClient = searchClient.cloneMe(); \r
- \r
+ this.searchClient = searchClient.cloneMe(); \r
} catch (ConfigurationException e) {\r
configurationErrors.add(new ConfigurationError("Search Client","Configuration",e.getMessage(),new ErrorHelper(configReader))); \r
} \r
public int getStart() {\r
return getCommandParameterValue("show","start",0);\r
}\r
- \r
+ \r
public String toggleRecord (String recId) {\r
if (hasRecord(recId)) {\r
removeCommand("record"); \r
dataObjects.put("record", new RecordResponse());\r
return "";\r
} else {\r
- return updateRecord(recId);\r
+ setRecordId(recId);\r
+ return doCommand("record");\r
}\r
}\r
\r
- private String updateRecord(String recId) { \r
- setCommandParameter("record",new CommandParameter("id","=",recId)); \r
- return doCommand("record"); \r
+ @Override\r
+ public void setRecordId(String recId) {\r
+ setCommandParameter("record",new CommandParameter("id","=",recId));\r
+ }\r
+ \r
+ @Override\r
+ public String getRecordId () {\r
+ return getCommandParameterValue("record","recid","");\r
}\r
\r
+ @Override\r
public boolean hasRecord (String recId) {\r
return getCommand("record").hasParameters() && getRecord().getRecId().equals(recId);\r
}\r
logger.debug("Found pending record ID change. Doing record before updating " + commands);\r
queryStates.hasPendingStateChange("record",false);\r
if (getCommand("record").hasParameters()) {\r
- updateRecord(getCommand("record").getParameter("id").getSimpleValue());\r
+ update("record");\r
} else {\r
removeCommand("record"); \r
dataObjects.put("record", new RecordResponse());\r