Exception test Fix
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / configuration / ApplicationConfig.java
index 673fe1d..86fd556 100644 (file)
@@ -29,6 +29,8 @@ import java.util.Vector;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 
+import lombok.Getter;
+
 import org.oransc.policyagent.exceptions.ServiceException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -42,6 +44,9 @@ public class ApplicationConfig {
 
     private Collection<Observer> observers = new Vector<>();
     private Map<String, RicConfig> ricConfigs = new HashMap<>();
+    @Getter
+    private Properties dmaapPublisherConfig;
+    @Getter
     private Properties dmaapConsumerConfig;
 
     @Autowired
@@ -72,10 +77,6 @@ public class ApplicationConfig {
         throw new ServiceException("Could not find ric: " + ricName);
     }
 
-    public Properties getDmaapConsumerConfig() {
-        return dmaapConsumerConfig;
-    }
-
     public static enum RicConfigUpdate {
         ADDED, CHANGED, REMOVED
     }
@@ -98,7 +99,8 @@ public class ApplicationConfig {
         }
     }
 
-    public void setConfiguration(@NotNull Collection<RicConfig> ricConfigs, Properties dmaapConsumerConfig) {
+    public void setConfiguration(@NotNull Collection<RicConfig> ricConfigs, Properties dmaapPublisherConfig,
+        Properties dmaapConsumerConfig) {
         Collection<Notification> notifications = new Vector<>();
         synchronized (this) {
             Map<String, RicConfig> newRicConfigs = new HashMap<>();
@@ -123,6 +125,7 @@ public class ApplicationConfig {
         }
         notifyObservers(notifications);
 
+        this.dmaapPublisherConfig = dmaapPublisherConfig;
         this.dmaapConsumerConfig = dmaapConsumerConfig;
     }