package com.indexdata.pz2utils4jsf.config;\r
\r
import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
\r
import javax.enterprise.context.SessionScoped;\r
import javax.enterprise.inject.Alternative;\r
"pazpar-application-jsf", ((HttpServletRequest) externalContext.getRequest()).getServerName());\r
ModuleConfiguration moduleConfig = mkConfigContext.getModuleConfiguration("pz2client");\r
pz2config = new Pz2Config(moduleConfig);\r
- logger.info("Accessing Pazpar2 at: " +pz2config.get("PAZPAR2_URL"));\r
+ logger.info(document());\r
+ }\r
+ \r
+\r
+ public List<String> document() {\r
+ List<String> doc = new ArrayList<String>();\r
+ \r
+ doc.add("-- App set to access Pazpar2 at: " +pz2config.get("PAZPAR2_URL"));\r
if (pz2config.get("PAZPAR2_SERVICE_XML") != null) {\r
- logger.info("Using the service definition contained in " + pz2config.getConfigFilePath() + "/" + pz2config.get("PAZPAR2_SERVICE_XML"));\r
+ doc.add("-- App set to use the service definition contained in " + pz2config.getConfigFilePath() + "/" + pz2config.get("PAZPAR2_SERVICE_XML"));\r
if (pz2config.get("PAZPAR2_SETTINGS_XML") != null) {\r
- logger.info("Using the target settings contained in " + pz2config.getConfigFilePath() + "/" + pz2config.get("PAZPAR2_SETTINGS_XML"));\r
+ doc.add("-- App set to use the target settings contained in " + pz2config.getConfigFilePath() + "/" + pz2config.get("PAZPAR2_SETTINGS_XML"));\r
} else {\r
- logger.info("Using the server side target settings as defined in the service definition.");\r
+ doc.add("-- App set to use the server side target settings as defined in the service definition.");\r
}\r
} else if (pz2config.get("PAZPAR2_SERVICE_ID") != null) {\r
- logger.info("Using the server side service definition identified by service id "+pz2config.get("PAZPAR2_SERVICE_ID"));\r
+ doc.add("-- App set to use the server side service definition identified by service id \""+pz2config.get("PAZPAR2_SERVICE_ID") + "\"");\r
} else {\r
- logger.error("Did not find service ID nor service definition XML file so set up pazpar2 service.");\r
+ doc.add("Error: Did not find service ID nor service definition XML file to set up pazpar2 service.");\r
}\r
-\r
+ return doc;\r
}\r
- \r
+ \r
\r
}\r