2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.vid.properties;
23 import org.springframework.beans.factory.annotation.Value;
24 import org.springframework.context.annotation.Bean;
25 import org.springframework.context.annotation.Configuration;
26 import org.springframework.context.annotation.PropertySource;
27 import org.springframework.context.annotation.PropertySources;
28 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
31 * The Class AsdcClientConfiguration.
36 @PropertySource(value="asdc.properties", ignoreResourceNotFound = true),
37 @PropertySource(value="${container.classpath:}/WEB-INF/conf/asdc.properties", ignoreResourceNotFound = true)
39 public class AsdcClientConfiguration {
42 public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
43 return new PropertySourcesPlaceholderConfigurer();
46 @Value("${asdc.client.type}")
47 private AsdcClientType asdcClientType;
49 /** The asdc client host. */
50 @Value("${asdc.client.rest.host}")
51 private String asdcClientHost;
53 /** The asdc client port. */
54 @Value("${asdc.client.rest.port}")
55 private int asdcClientPort;
57 /** The asdc client auth. */
58 @Value("${asdc.client.rest.auth}")
59 public String asdcClientAuth;
61 /** The asdc client protocol. */
62 @Value("${asdc.client.rest.protocol}")
63 public String asdcClientProtocol;
66 * Gets the asdc client type.
68 * @return the asdc client type
70 public AsdcClientType getAsdcClientType() {
71 return asdcClientType;
75 * Gets the asdc client host.
77 * @return the asdc client host
79 public String getAsdcClientHost() {
80 return asdcClientHost;
84 * Gets the asdc client port.
86 * @return the asdc client port
88 public int getAsdcClientPort() {
89 return asdcClientPort;
93 * Gets the asdc client auth.
95 * @return the asdc client auth
97 public String getAsdcClientAuth() {
98 return asdcClientAuth;
102 * Gets the asdc client protocol.
104 * @return the asdc client protocol
106 public String getAsdcClientProtocol() {
107 return asdcClientProtocol;
111 * The Enum AsdcClientType.
113 public enum AsdcClientType {
115 /** The in memory. */