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.annotation.PropertySources;
\r
28 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
\r
31 * The Class AsdcClientConfiguration.
\r
36 @PropertySource(value="asdc.properties", ignoreResourceNotFound = true),
\r
37 @PropertySource(value="${container.classpath:}/WEB-INF/conf/asdc.properties", ignoreResourceNotFound = true)
\r
39 public class AsdcClientConfiguration {
\r
42 public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
\r
43 return new PropertySourcesPlaceholderConfigurer();
\r
46 @Value("${asdc.client.type}")
\r
47 private AsdcClientType asdcClientType;
\r
49 /** The asdc client host. */
\r
50 @Value("${asdc.client.rest.host}")
\r
51 private String asdcClientHost;
\r
53 /** The asdc client port. */
\r
54 @Value("${asdc.client.rest.port}")
\r
55 private int asdcClientPort;
\r
57 /** The asdc client auth. */
\r
58 @Value("${asdc.client.rest.auth}")
\r
59 public String asdcClientAuth;
\r
61 /** The asdc client protocol. */
\r
62 @Value("${asdc.client.rest.protocol}")
\r
63 public String asdcClientProtocol;
\r
66 * Gets the asdc client type.
\r
68 * @return the asdc client type
\r
70 public AsdcClientType getAsdcClientType() {
\r
71 return asdcClientType;
\r
75 * Gets the asdc client host.
\r
77 * @return the asdc client host
\r
79 public String getAsdcClientHost() {
\r
80 return asdcClientHost;
\r
84 * Gets the asdc client port.
\r
86 * @return the asdc client port
\r
88 public int getAsdcClientPort() {
\r
89 return asdcClientPort;
\r
93 * Gets the asdc client auth.
\r
95 * @return the asdc client auth
\r
97 public String getAsdcClientAuth() {
\r
98 return asdcClientAuth;
\r
102 * Gets the asdc client protocol.
\r
104 * @return the asdc client protocol
\r
106 public String getAsdcClientProtocol() {
\r
107 return asdcClientProtocol;
\r
111 * The Enum AsdcClientType.
\r
113 public enum AsdcClientType {
\r
115 /** The in memory. */
\r