\r
import com.indexdata.pz2utils4jsf.config.ConfigurationReader;\r
import com.indexdata.pz2utils4jsf.controls.ResultsPager;\r
\r
import com.indexdata.pz2utils4jsf.config.ConfigurationReader;\r
import com.indexdata.pz2utils4jsf.controls.ResultsPager;\r
import com.indexdata.pz2utils4jsf.errors.ConfigurationException;\r
import com.indexdata.pz2utils4jsf.errors.ErrorHelper;\r
import com.indexdata.pz2utils4jsf.errors.ErrorInterface;\r
import com.indexdata.pz2utils4jsf.errors.ConfigurationException;\r
import com.indexdata.pz2utils4jsf.errors.ErrorHelper;\r
import com.indexdata.pz2utils4jsf.errors.ErrorInterface;\r
private static final long serialVersionUID = 3947514708343320514L;\r
private static Logger logger = Logger.getLogger(Pz2Session.class);\r
\r
private static final long serialVersionUID = 3947514708343320514L;\r
private static Logger logger = Logger.getLogger(Pz2Session.class);\r
\r
- private Map<String,Pazpar2ResponseData> dataObjects = new ConcurrentHashMap<String,Pazpar2ResponseData>();\r
- private QueryStates queryStates = new QueryStates();\r
- private ErrorHelper errorHelper = null;\r
+ protected Map<String,Pazpar2ResponseData> dataObjects = new ConcurrentHashMap<String,Pazpar2ResponseData>();\r
+ protected QueryStates queryStates = new QueryStates();\r
+ protected ErrorHelper errorHelper = null;\r
- private List<ErrorInterface> configurationErrors = null;\r
- private SearchClient searchClient = null; \r
- private TargetFilter targetFilter = null; \r
- private ResultsPager pager = null; \r
+ protected List<ErrorInterface> configurationErrors = null;\r
+ protected SearchClient searchClient = null; \r
+ protected TargetFilter targetFilter = null; \r
+ protected ResultsPager pager = null; \r
// 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
// 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
public void doSearch(String query) {\r
setCommandParameter("search",new CommandParameter("query","=",query)); \r
doSearch();\r
public void doSearch(String query) {\r
setCommandParameter("search",new CommandParameter("query","=",query)); \r
doSearch();\r
if (queryStates.hasPendingStateChange("search")) { \r
logger.debug("Found pending search change. Doing search before updating " + commands);\r
doSearch();\r
if (queryStates.hasPendingStateChange("search")) { \r
logger.debug("Found pending search change. Doing search before updating " + commands);\r
doSearch();\r
if (getShow()!=null) {\r
logger.debug("Active clients: "+getShow().getActiveClients());\r
return getShow().getActiveClients();\r
if (getShow()!=null) {\r
logger.debug("Active clients: "+getShow().getActiveClients());\r
return getShow().getActiveClients();\r
logger.debug("Setting parameter for " + commandName + ": " + parameter);\r
queryStates.getCurrentState().setCommandParameter(commandName, parameter, queryStates); \r
}\r
\r
\r
logger.debug("Setting parameter for " + commandName + ": " + parameter);\r
queryStates.getCurrentState().setCommandParameter(commandName, parameter, queryStates); \r
}\r
\r
\r
- private String getCommandParameterValue (String commandName, String parameterName, String defaultValue) { \r
+ protected String getCommandParameterValue (String commandName, String parameterName, String defaultValue) { \r
Pazpar2Command command = getCommand(commandName);\r
if (command != null) {\r
CommandParameter parameter = command.getParameter(parameterName);\r
Pazpar2Command command = getCommand(commandName);\r
if (command != null) {\r
CommandParameter parameter = command.getParameter(parameterName);\r
- private String getCommandParameterValueSimple (String commandName, String parameterName, String defaultValue) { \r
+ protected String getCommandParameterValueSimple (String commandName, String parameterName, String defaultValue) { \r
Pazpar2Command command = getCommand(commandName);\r
if (command != null) {\r
CommandParameter parameter = command.getParameter(parameterName);\r
Pazpar2Command command = getCommand(commandName);\r
if (command != null) {\r
CommandParameter parameter = command.getParameter(parameterName);\r
- private int getCommandParameterValue (String commandName, String parameterName, int defaultValue) {\r
+ protected int getCommandParameterValue (String commandName, String parameterName, int defaultValue) {\r
Pazpar2Command command = getCommand(commandName);\r
if (command != null) {\r
CommandParameter parameter = command.getParameter(parameterName);\r
Pazpar2Command command = getCommand(commandName);\r
if (command != null) {\r
CommandParameter parameter = command.getParameter(parameterName);\r
Pazpar2Command command = getCommand(commandName); \r
logger.debug(command.getEncodedQueryString() + ": Results for "+ getCommand("search").getEncodedQueryString());\r
Pazpar2Command command = getCommand(commandName); \r
logger.debug(command.getEncodedQueryString() + ": Results for "+ getCommand("search").getEncodedQueryString());\r
logger.debug("Resetting show,stat,termlist,bytarget,search response objects.");\r
dataObjects = new ConcurrentHashMap<String,Pazpar2ResponseData>();\r
dataObjects.put("show", new ShowResponse());\r
logger.debug("Resetting show,stat,termlist,bytarget,search response objects.");\r
dataObjects = new ConcurrentHashMap<String,Pazpar2ResponseData>();\r
dataObjects.put("show", new ShowResponse());\r