</dependencies>\r
\r
<build>\r
- <sourceDirectory>src</sourceDirectory>\r
+ <directory>target</directory>\r
+ <outputDirectory>target/classes</outputDirectory>\r
+ <sourceDirectory>src/main/java</sourceDirectory>\r
<resources>\r
<resource>\r
<directory>src</directory>\r
}\r
\r
public Pz2Config (Map<String,String> parameters) {\r
- logger.debug(Utils.objectId(this) + " being constructed with parameter map argument");\r
+ //logger.debug(Utils.objectId(this) + " being constructed with parameter map argument");\r
setDefaults();\r
for (String key : parameters.keySet()) {\r
properties.put(key, parameters.get(key));\r
\r
@Override\r
public String getConfigFilePath() {\r
- return moduleConfig.getConfigFilePath();\r
+ return ""; // moduleConfig.getConfigFilePath();\r
}\r
\r
\r
--- /dev/null
+/**\r
+ * \r
+ */\r
+package com.indexdata.pz2utils4jsf.config;\r
+\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import javax.enterprise.context.SessionScoped;\r
+import javax.enterprise.inject.Alternative;\r
+import javax.inject.Named;\r
+\r
+@Named @SessionScoped @Alternative\r
+public class Pz2ConfigureByHardcoding implements Pz2Configurator {\r
+\r
+ /**\r
+ * \r
+ */\r
+ private static final long serialVersionUID = -3833516705975419652L;\r
+ private Pz2Config pz2config = null;\r
+\r
+ \r
+ @Override\r
+ public Pz2Config getConfig() throws IOException {\r
+ if (pz2config == null) {\r
+ createConfig();\r
+ }\r
+ return pz2config;\r
+ }\r
+ \r
+ private void createConfig () throws IOException {\r
+ Map<String,String> parameters = new HashMap<String,String>();\r
+ parameters.put("PAZPAR2_URL", "http://mk2-test.indexdata.com/test-pazpar2/");\r
+ parameters.put("PAZPAR2_SERVICE_ID", "jsfdemo");\r
+ pz2config = new Pz2Config(parameters); \r
+ }\r
+\r
+\r
+ /* (non-Javadoc)\r
+ * @see com.indexdata.pz2utils4jsf.config.Pz2Configurator#document()\r
+ */\r
+ @Override\r
+ public List<String> document() {\r
+ List<String> docs = new ArrayList<String>();\r
+ docs.add("No docs");\r
+ return docs;\r
+ }\r
+\r
+}\r
\r
public List<String> document() {\r
List<String> doc = new ArrayList<String>();\r
- \r
+ doc.add("Application was configured using the file "+ pz2config.getConfigFilePath());\r
doc.add("-- App set to access Pazpar2 at: " +pz2config.get("PAZPAR2_URL"));\r
if (pz2config.get("PAZPAR2_SERVICE_XML") != null) {\r
doc.add("-- App set to use the service definition contained in " + pz2config.getConfigFilePath() + "/" + pz2config.get("PAZPAR2_SERVICE_XML"));\r