setDefaults();\r
}\r
\r
- public Pz2Config (Map<String,String> parameters) {\r
- //logger.debug(Utils.objectId(this) + " being constructed with parameter map argument");\r
+ public Pz2Config (Map<String,String> parameters) { \r
setDefaults();\r
for (String key : parameters.keySet()) {\r
properties.put(key, parameters.get(key));\r
properties.put(key, value);\r
}\r
\r
- public void setPazpar2Url (String value) {\r
- properties.put("PAZPAR2_URL", value);\r
- }\r
- \r
- public void setPazpar2ServiceId (String value) {\r
- properties.put("PAZPAR2_SERVICE_ID",value);\r
- }\r
-\r
@Override\r
public String get(String key, String defaultValue) {\r
if (properties.containsKey(key)) {\r
} \r
}\r
\r
-\r
public List<String> document() {\r
List<String> doc = new ArrayList<String>();\r
- doc.add(":"+nl+"Attempted to configure service using the file " + configFilePathAndName);\r
+ doc.add(nl+"Attempted to configure service using the file " + configFilePathAndName);\r
doc.add(nl+"-- Configured to access Pazpar2 at: " +pz2config.get("PAZPAR2_URL"));\r
if (pz2config.get("PAZPAR2_SERVICE_XML") != null) {\r
doc.add(nl+"-- Configured to use the service definition contained in " + pz2config.getConfigFilePath() + "/" + pz2config.get("PAZPAR2_SERVICE_XML"));\r
package com.indexdata.pz2utils4jsf.pazpar2;\r
\r
+import java.io.ByteArrayOutputStream;\r
import java.io.IOException;\r
import java.util.ArrayList;\r
import java.util.List;\r
\r
import org.apache.log4j.Logger;\r
\r
+import com.indexdata.masterkey.pazpar2.client.ClientCommand;\r
import com.indexdata.masterkey.pazpar2.client.Pazpar2Client;\r
import com.indexdata.masterkey.pazpar2.client.Pazpar2ClientConfiguration;\r
import com.indexdata.masterkey.pazpar2.client.Pazpar2ClientGeneric;\r
+import com.indexdata.masterkey.pazpar2.client.exceptions.Pazpar2ErrorException;\r
import com.indexdata.masterkey.pazpar2.client.exceptions.ProxyErrorException;\r
import com.indexdata.pz2utils4jsf.config.Pz2Configurator;\r
import com.indexdata.pz2utils4jsf.controls.ResultsPager;\r
+import com.indexdata.pz2utils4jsf.errors.ConfigurationError;\r
import com.indexdata.pz2utils4jsf.errors.ConfigurationException;\r
-import com.indexdata.pz2utils4jsf.errors.ErrorInterface;\r
import com.indexdata.pz2utils4jsf.errors.ErrorHelper;\r
-import com.indexdata.pz2utils4jsf.errors.ConfigurationError;\r
-import com.indexdata.pz2utils4jsf.pazpar2.data.CommandError;\r
+import com.indexdata.pz2utils4jsf.errors.ErrorInterface;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.ByTarget;\r
+import com.indexdata.pz2utils4jsf.pazpar2.data.CommandError;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.Pazpar2ResponseData;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.Pazpar2ResponseParser;\r
import com.indexdata.pz2utils4jsf.pazpar2.data.RecordResponse;\r
}\r
if (cfg != null) {\r
try {\r
- client = new Pazpar2ClientGeneric(cfg); \r
+ client = new Pazpar2ClientGeneric(cfg); \r
} catch (ProxyErrorException pe) {\r
logger.error("Could not instantiate Pazpar2 client: " + pe.getMessage());\r
configurationErrors.add(new ConfigurationError("Pz2Client error","ProxyError","Could not create Pazpar2 client: " +pe.getMessage(),errorHelper)); \r
} \r
- logger.info("Found " + configurationErrors.size() + " configuration errors"); \r
+ if (hasConfigurationErrors()) {\r
+ logger.info("Found " + configurationErrors.size() + " configuration errors");\r
+ }\r
}\r
resetDataObjects();\r
} else {\r