diff options
author | 2020-06-09 09:58:31 +0200 | |
---|---|---|
committer | 2020-06-10 15:40:43 +0200 | |
commit | 0022ba11a0dd13f5a4ee030913cd37d1a3dcb97b (patch) | |
tree | 5ba24498a06cc09cc52a18894fd1203dcbb364f8 /certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model | |
parent | 892eb3fb564c2d7c50e2ecb0494bbc599f5f7ae4 (diff) |
Add output type env to certservice client configuration
- add new enum value OUTPUT_TYPE
- add reading new OUTPUT_TYPE env in EnvsForClient
- add handling output type to ClientConfigurationFactory
Issue-ID: AAF-1152
Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Change-Id: I60269c3befff90f685e16a8e7255674df6ca9368
Diffstat (limited to 'certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model')
-rw-r--r-- | certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java index 2ac481dc..78fa1b4b 100644 --- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java +++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/model/ClientConfiguration.java @@ -26,16 +26,19 @@ public class ClientConfiguration implements ConfigurationModel { private static final Integer DEFAULT_TIMEOUT_MS = 30000; private static final String DEFAULT_REQUEST_URL = "https://aaf-cert-service:8443/v1/certificate/"; + private static final String DEFAULT_OUTPUT_TYPE = "P12"; private String urlToCertService; private Integer requestTimeout; private String certsOutputPath; private String caName; + private String outputType; public ClientConfiguration() { urlToCertService = DEFAULT_REQUEST_URL; requestTimeout = DEFAULT_TIMEOUT_MS; + outputType = DEFAULT_OUTPUT_TYPE; } @@ -75,12 +78,22 @@ public class ClientConfiguration implements ConfigurationModel { return this; } + public String getOutputType() { + return outputType; + } + + public ClientConfiguration setOutputType(String outputType) { + this.outputType = outputType; + return this; + } + @Override public String toString() { - return String.format("%s: %s, %s: %s, %s: %s, %s: %s", + return String.format("%s: %s, %s: %s, %s: %s, %s: %s, %s: %s", ClientConfigurationEnvs.REQUEST_URL, urlToCertService, ClientConfigurationEnvs.REQUEST_TIMEOUT, requestTimeout, ClientConfigurationEnvs.OUTPUT_PATH, certsOutputPath, - ClientConfigurationEnvs.CA_NAME, caName); + ClientConfigurationEnvs.CA_NAME, caName, + ClientConfigurationEnvs.OUTPUT_TYPE, outputType); } } |