diff --git a/uni-registrar-web/src/main/java/uniregistrar/web/config/WebAppConfig.java b/uni-registrar-web/src/main/java/uniregistrar/web/config/WebAppConfig.java index fc8b80a..b6baa61 100644 --- a/uni-registrar-web/src/main/java/uniregistrar/web/config/WebAppConfig.java +++ b/uni-registrar-web/src/main/java/uniregistrar/web/config/WebAppConfig.java @@ -121,12 +121,13 @@ public void configureLocalUniRegistrar(DriverConfigs driverConfigs, LocalUniRegi Map drivers = new LinkedHashMap<>(); - for (DriverConfigs.DriverConfig dc : driverConfigs.getDrivers()) { + for (DriverConfigs.DriverConfig driverConfig : driverConfigs.getDrivers()) { - String method = dc.getMethod(); - String url = dc.getUrl(); - String propertiesEndpoint = dc.getPropertiesEndpoint(); - String includeMethodParameter = dc.getIncludeMethodParameter(); + String method = driverConfig.getMethod(); + String url = driverConfig.getUrl(); + String propertiesEndpoint = driverConfig.getPropertiesEndpoint(); + String includeMethodParameter = driverConfig.getIncludeMethodParameter(); + Map traits = driverConfig.getTraits(); if (method == null) throw new IllegalArgumentException("Missing 'method' entry in driver configuration."); if (url == null) throw new IllegalArgumentException("Missing 'url' entry in driver configuration."); @@ -146,6 +147,7 @@ public void configureLocalUniRegistrar(DriverConfigs driverConfigs, LocalUniRegi driver.setDeactivateResourceUri(normalizeUri((url + servletMappings.getDeactivateResource()), false)); if ("true".equals(propertiesEndpoint)) driver.setPropertiesUri(normalizeUri((url + servletMappings.getProperties()), false)); if ("true".equals(includeMethodParameter)) driver.setIncludeMethodParameter(Boolean.valueOf(includeMethodParameter)); + if (traits != null) driver.setTraits(traits); // done diff --git a/uni-registrar-web/src/main/resources/application.yml b/uni-registrar-web/src/main/resources/application.yml index ddb3d25..f755e83 100644 --- a/uni-registrar-web/src/main/resources/application.yml +++ b/uni-registrar-web/src/main/resources/application.yml @@ -24,17 +24,32 @@ uniregistrar: - method: sov url: http://driver-did-sov:9080/ propertiesEndpoint: 'true' + traits: + deactivatable: true + enumerable: true + historyAvailable: true + humanReadbale: false - method: v1 url: http://driver-did-v1:9080/ propertiesEndpoint: 'true' - method: key url: http://driver-did-key:9080/ + traits: + deactivatable: false + enumerable: false + historyAvailable: false + humanReadbale: false - method: ion url: http://driver-did-ion:9080/ propertiesEndpoint: 'true' - method: web url: http://driver-did-web:9080/ propertiesEndpoint: 'true' + traits: + deactivatable: true + enumerable: false + historyAvailable: false + humanReadbale: true - method: ebsi url: http://driver-did-ebsi:9080/ propertiesEndpoint: 'false'