2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.openecomp.vid.properties;
\r
23 import org.springframework.beans.factory.annotation.Value;
\r
24 import org.springframework.context.annotation.Bean;
\r
25 import org.springframework.context.annotation.Configuration;
\r
26 import org.springframework.context.annotation.PropertySource;
\r
27 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
\r
30 * The Class AsdcClientConfiguration.
\r
33 @PropertySource(value="${container.classpath:}/WEB-INF/conf/asdc.properties")
\r
34 public class AsdcClientConfiguration {
\r
37 public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
\r
38 return new PropertySourcesPlaceholderConfigurer();
\r
41 @Value("${asdc.client.type}")
\r
42 private AsdcClientType asdcClientType;
\r
44 /** The asdc client host. */
\r
45 @Value("${asdc.client.rest.host}")
\r
46 private String asdcClientHost;
\r
48 /** The asdc client port. */
\r
49 @Value("${asdc.client.rest.port}")
\r
50 private int asdcClientPort;
\r
52 /** The asdc client auth. */
\r
53 @Value("${asdc.client.rest.auth}")
\r
54 public String asdcClientAuth;
\r
56 /** The asdc client protocol. */
\r
57 @Value("${asdc.client.rest.protocol}")
\r
58 public String asdcClientProtocol;
\r
61 * Gets the asdc client type.
\r
63 * @return the asdc client type
\r
65 public AsdcClientType getAsdcClientType() {
\r
66 return asdcClientType;
\r
70 * Gets the asdc client host.
\r
72 * @return the asdc client host
\r
74 public String getAsdcClientHost() {
\r
75 return asdcClientHost;
\r
79 * Gets the asdc client port.
\r
81 * @return the asdc client port
\r
83 public int getAsdcClientPort() {
\r
84 return asdcClientPort;
\r
88 * Gets the asdc client auth.
\r
90 * @return the asdc client auth
\r
92 public String getAsdcClientAuth() {
\r
93 return asdcClientAuth;
\r
97 * Gets the asdc client protocol.
\r
99 * @return the asdc client protocol
\r
101 public String getAsdcClientProtocol() {
\r
102 return asdcClientProtocol;
\r
106 * The Enum AsdcClientType.
\r
108 public enum AsdcClientType {
\r
110 /** The in memory. */
\r