\r
import com.indexdata.pz2utils4jsf.config.Pz2Configurator;\r
import com.indexdata.pz2utils4jsf.controls.ResultsPager;\r
+import com.indexdata.pz2utils4jsf.errors.ErrorInterface;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.ByTarget;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.RecordResponse;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.ShowResponse;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.StatResponse;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.TermListsResponse;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.TermResponse;\r
+import com.indexdata.pz2utils4jsf.utils.Utils;\r
\r
-@Named("pz2")\r
-@SessionScoped\r
+@Named("pz2") @SessionScoped\r
public class Pz2Bean implements Pz2Interface, Serializable {\r
\r
private static final long serialVersionUID = 3440277287081557861L;\r
@Inject Pz2Configurator pz2conf;\r
\r
public Pz2Bean () {\r
- logger.debug("Instantiating pz2 bean"); \r
- pz2 = new Pz2Session(); \r
+ logger.info("Instantiating pz2 bean [" + Utils.objectId(this) + "]");\r
}\r
\r
@PostConstruct\r
public void initiatePz2Session() {\r
+ logger.debug(Utils.objectId(this) + " will instantiate a Pz2Session next.");\r
+ pz2 = new Pz2Session();\r
+ logger.debug(Utils.objectId(this) + " will forward configuration to the new Pz2Session [" + Utils.objectId(pz2) + "]");\r
pz2.init(pz2conf);\r
}\r
\r
/* (non-Javadoc)\r
* @see com.indexdata.pz2utils4jsf.pazpar2.Pz2Interface#doSearch(java.lang.String)\r
*/\r
- public void doSearch(String query) {\r
+ public void doSearch(String query) { \r
pz2.doSearch(query);\r
}\r
\r
* @see com.indexdata.pz2utils4jsf.pazpar2.Pz2Interface#doSearch()\r
*/\r
public void doSearch() {\r
+ logger.info(Utils.objectId(this) + " doing search for "+this.getQuery());\r
pz2.doSearch();\r
}\r
\r
public void setCurrentStateKey(String key) {\r
pz2.setCurrentStateKey(key); \r
}\r
+ \r
+ public boolean hasErrors() {\r
+ return pz2.hasErrors();\r
+ }\r
+ \r
+ public ErrorInterface getCommandError() {\r
+ return pz2.getCommandError();\r
+ }\r
+ \r
+ public List<ErrorInterface> getConfigurationErrors () {\r
+ return pz2.getConfigurationErrors();\r
+ }\r
+\r
+ @Override\r
+ public boolean hasCommandErrors() {\r
+ return pz2.hasCommandErrors();\r
+ }\r
+\r
+ @Override\r
+ public boolean hasConfigurationErrors() {\r
+ return pz2.hasConfigurationErrors();\r
+ }\r
\r
}\r