Merge "Update get Dcae Status flow"
[clamp.git] / src / main / java / org / onap / clamp / clds / config / PolicyConfiguration.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP CLAMP
4  * ================================================================================
5  * Copyright (C) 2018 AT&T Intellectual Property. All rights
6  *                             reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END============================================
20  * ===================================================================
21  * 
22  */
23
24 package org.onap.clamp.clds.config;
25
26 import java.util.Properties;
27
28 import org.springframework.boot.context.properties.ConfigurationProperties;
29 import org.springframework.stereotype.Component;
30
31 @Component
32 @ConfigurationProperties(prefix = "clamp.config.policy")
33 public class PolicyConfiguration {
34
35     public static final String PDP_URL1 = "PDP_URL1";
36     public static final String PDP_URL2 = "PDP_URL2";
37     public static final String PAP_URL = "PAP_URL";
38     public static final String NOTIFICATION_TYPE = "NOTIFICATION_TYPE";
39     public static final String NOTIFICATION_UEB_SERVERS = "NOTIFICATION_UEB_SERVERS";
40     public static final String CLIENT_ID = "CLIENT_ID";
41     public static final String CLIENT_KEY = "CLIENT_KEY";
42     public static final String ENVIRONMENT = "ENVIRONMENT";
43     private String pdpUrl1;
44     private String pdpUrl2;
45     private String papUrl;
46     private String notificationType;
47     private String notificationUebServers;
48     private String clientId;
49     private String clientKey;
50     private String policyEnvironment;
51
52     public String getPdpUrl1() {
53         return pdpUrl1;
54     }
55
56     public void setPdpUrl1(String pdpUrl1) {
57         this.pdpUrl1 = pdpUrl1;
58     }
59
60     public String getPdpUrl2() {
61         return pdpUrl2;
62     }
63
64     public void setPdpUrl2(String pdpUrl2) {
65         this.pdpUrl2 = pdpUrl2;
66     }
67
68     public String getPapUrl() {
69         return papUrl;
70     }
71
72     public void setPapUrl(String papUrl) {
73         this.papUrl = papUrl;
74     }
75
76     public String getNotificationType() {
77         return notificationType;
78     }
79
80     public void setNotificationType(String notificationType) {
81         this.notificationType = notificationType;
82     }
83
84     public String getNotificationUebServers() {
85         return notificationUebServers;
86     }
87
88     public void setNotificationUebServers(String notificationUebServers) {
89         this.notificationUebServers = notificationUebServers;
90     }
91
92     public String getClientId() {
93         return clientId;
94     }
95
96     public void setClientId(String clientId) {
97         this.clientId = clientId;
98     }
99
100     public String getClientKey() {
101         return clientKey;
102     }
103
104     public void setClientKey(String clientKey) {
105         this.clientKey = clientKey;
106     }
107
108     public String getPolicyEnvironment() {
109         return policyEnvironment;
110     }
111
112     public void setPolicyEnvironment(String environment) {
113         this.policyEnvironment = environment;
114     }
115
116     /**
117      * Returns policy configuration properties.
118      *
119      * @return policy configuration properties
120      */
121     public Properties getProperties() {
122         Properties prop = new Properties();
123         prop.put(PDP_URL1, pdpUrl1);
124         prop.put(PDP_URL2, pdpUrl2);
125         prop.put(PAP_URL, papUrl);
126         prop.put(NOTIFICATION_TYPE, notificationType);
127         prop.put(NOTIFICATION_UEB_SERVERS, notificationUebServers);
128         prop.put(CLIENT_ID, clientId);
129         prop.put(CLIENT_KEY, clientKey);
130         prop.put(ENVIRONMENT, policyEnvironment);
131         return prop;
132     }
133 }