[VID-6] Initial rebase push
[vid.git] / vid-app-common / src / main / java / org / openecomp / vid / properties / AsdcClientConfiguration.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * VID\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
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \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
19  */\r
20 \r
21 package org.openecomp.vid.properties;\r
22 \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
28 \r
29 /**\r
30  * The Class AsdcClientConfiguration.\r
31  */\r
32 @Configuration\r
33 @PropertySource(value="${container.classpath:}/WEB-INF/conf/asdc.properties")\r
34 public class AsdcClientConfiguration {\r
35         \r
36     @Bean \r
37     public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { \r
38         return new PropertySourcesPlaceholderConfigurer(); \r
39     }\r
40 \r
41         @Value("${asdc.client.type}")\r
42         private AsdcClientType asdcClientType;\r
43         \r
44         /** The asdc client host. */\r
45         @Value("${asdc.client.rest.host}")\r
46         private String asdcClientHost;\r
47         \r
48         /** The asdc client port. */\r
49         @Value("${asdc.client.rest.port}")\r
50         private int asdcClientPort;\r
51         \r
52         /** The asdc client auth. */\r
53         @Value("${asdc.client.rest.auth}")\r
54         public String asdcClientAuth;\r
55 \r
56         /** The asdc client protocol. */\r
57         @Value("${asdc.client.rest.protocol}")\r
58         public String asdcClientProtocol;\r
59         \r
60         /**\r
61          * Gets the asdc client type.\r
62          *\r
63          * @return the asdc client type\r
64          */\r
65         public AsdcClientType getAsdcClientType() {\r
66                 return asdcClientType;\r
67         }\r
68 \r
69         /**\r
70          * Gets the asdc client host.\r
71          *\r
72          * @return the asdc client host\r
73          */\r
74         public String getAsdcClientHost() {\r
75                 return asdcClientHost;\r
76         }\r
77 \r
78         /**\r
79          * Gets the asdc client port.\r
80          *\r
81          * @return the asdc client port\r
82          */\r
83         public int getAsdcClientPort() {\r
84                 return asdcClientPort;\r
85         }\r
86 \r
87         /**\r
88          * Gets the asdc client auth.\r
89          *\r
90          * @return the asdc client auth\r
91          */\r
92         public String getAsdcClientAuth() {\r
93                 return asdcClientAuth;\r
94         }\r
95 \r
96         /**\r
97          * Gets the asdc client protocol.\r
98          *\r
99          * @return the asdc client protocol\r
100          */\r
101         public String getAsdcClientProtocol() {\r
102                 return asdcClientProtocol;\r
103         }\r
104         \r
105         /**\r
106          * The Enum AsdcClientType.\r
107          */\r
108         public enum AsdcClientType {\r
109                 \r
110                 /** The in memory. */\r
111                 IN_MEMORY,\r
112                 \r
113                 /** The rest. */\r
114                 REST\r
115         }\r
116 }\r