2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 AT&T Intellectual Property. All rights
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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 * ===================================================================
24 package org.onap.clamp.clds.config;
26 import java.util.Properties;
28 import org.springframework.boot.context.properties.ConfigurationProperties;
29 import org.springframework.stereotype.Component;
32 @ConfigurationProperties(prefix = "clamp.config.policy")
33 public class PolicyConfiguration {
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;
52 public String getPdpUrl1() {
56 public void setPdpUrl1(String pdpUrl1) {
57 this.pdpUrl1 = pdpUrl1;
60 public String getPdpUrl2() {
64 public void setPdpUrl2(String pdpUrl2) {
65 this.pdpUrl2 = pdpUrl2;
68 public String getPapUrl() {
72 public void setPapUrl(String papUrl) {
76 public String getNotificationType() {
77 return notificationType;
80 public void setNotificationType(String notificationType) {
81 this.notificationType = notificationType;
84 public String getNotificationUebServers() {
85 return notificationUebServers;
88 public void setNotificationUebServers(String notificationUebServers) {
89 this.notificationUebServers = notificationUebServers;
92 public String getClientId() {
96 public void setClientId(String clientId) {
97 this.clientId = clientId;
100 public String getClientKey() {
104 public void setClientKey(String clientKey) {
105 this.clientKey = clientKey;
108 public String getPolicyEnvironment() {
109 return policyEnvironment;
112 public void setPolicyEnvironment(String environment) {
113 this.policyEnvironment = environment;
117 * Returns policy configuration properties.
119 * @return policy configuration properties
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);