- public Pz2Config (String pazpar2Url, String pazpar2ServiceId) {\r
- setStatics();\r
- setPazpar2Url(pazpar2Url);\r
- setPazpar2ServiceId(pazpar2ServiceId);\r
- logger.debug("Creating pazpar2 configuration with "+ get("PAZPAR2_URL") + " and " + get("PAZPAR2_SERVICE_ID"));\r
+ public Pz2Config (Map<String,String> parameters) {\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
+ }\r
+ \r
+ public Pz2Config (ModuleConfiguration moduleConfig) throws IOException {\r
+ logger.debug(Utils.objectId(this) + " being constructed with moduleConfig argument.");\r
+ this.moduleConfig = moduleConfig;\r
+ for (String key : moduleConfig.getConfigMap().keySet()) {\r
+ properties.put(key, moduleConfig.getConfigParameter(key));\r
+ }\r