diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/restproperties/CDSPropertiesImpl.java')
-rw-r--r-- | bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/restproperties/CDSPropertiesImpl.java | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/restproperties/CDSPropertiesImpl.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/restproperties/CDSPropertiesImpl.java new file mode 100644 index 0000000000..b8ab588a75 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/restproperties/CDSPropertiesImpl.java @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2019 Bell Canada. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.so.client.restproperties; + +import java.net.URL; +import java.util.Objects; +import org.onap.so.bpmn.core.UrnPropertiesReader; +import org.onap.so.client.cds.CDSProperties; + +public class CDSPropertiesImpl implements CDSProperties { + + private static final String ENDPOINT = "cds.endpoint"; + private static final String PORT = "cds.port"; + + public CDSPropertiesImpl() { + // Needed for service loader + } + + @Override + public String getHost() { + return Objects.requireNonNull(UrnPropertiesReader.getVariable(ENDPOINT)); + } + + @Override + public int getPort() { + return Integer.parseInt(Objects.requireNonNull(UrnPropertiesReader.getVariable(PORT))); + } + + @Override + public URL getEndpoint() { + return null; + } + + @Override + public String getSystemName() { + return "MSO"; + } + + @Override + public Integer getRetries() { + return null; + } + + @Override + public Long getDelayBetweenRetries() { + return null; + } + + @Override + public boolean mapNotFoundToEmpty() { + return false; + } +} |