Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Exception test Fix
[nonrtric.git]
/
policy-agent
/
src
/
main
/
java
/
org
/
oransc
/
policyagent
/
configuration
/
ApplicationConfig.java
diff --git
a/policy-agent/src/main/java/org/oransc/policyagent/configuration/ApplicationConfig.java
b/policy-agent/src/main/java/org/oransc/policyagent/configuration/ApplicationConfig.java
index
d4f7261
..
86fd556
100644
(file)
--- a/
policy-agent/src/main/java/org/oransc/policyagent/configuration/ApplicationConfig.java
+++ b/
policy-agent/src/main/java/org/oransc/policyagent/configuration/ApplicationConfig.java
@@
-23,11
+23,14
@@
package org.oransc.policyagent.configuration;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
+import java.util.Properties;
import java.util.Vector;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
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;
import org.oransc.policyagent.exceptions.ServiceException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@
-41,6
+44,10
@@
public class ApplicationConfig {
private Collection<Observer> observers = new Vector<>();
private Map<String, RicConfig> ricConfigs = new HashMap<>();
private Collection<Observer> observers = new Vector<>();
private Map<String, RicConfig> ricConfigs = new HashMap<>();
+ @Getter
+ private Properties dmaapPublisherConfig;
+ @Getter
+ private Properties dmaapConsumerConfig;
@Autowired
public ApplicationConfig() {
@Autowired
public ApplicationConfig() {
@@
-50,6
+57,13
@@
public class ApplicationConfig {
return this.filepath;
}
return this.filepath;
}
+ /*
+ * Do not remove, used by framework!
+ */
+ public synchronized void setFilepath(String filepath) {
+ this.filepath = filepath;
+ }
+
public synchronized Collection<RicConfig> getRicConfigs() {
return this.ricConfigs.values();
}
public synchronized Collection<RicConfig> getRicConfigs() {
return this.ricConfigs.values();
}
@@
-85,7
+99,8
@@
public class ApplicationConfig {
}
}
}
}
- public void setConfiguration(@NotNull Collection<RicConfig> ricConfigs) {
+ public void setConfiguration(@NotNull Collection<RicConfig> ricConfigs, Properties dmaapPublisherConfig,
+ Properties dmaapConsumerConfig) {
Collection<Notification> notifications = new Vector<>();
synchronized (this) {
Map<String, RicConfig> newRicConfigs = new HashMap<>();
Collection<Notification> notifications = new Vector<>();
synchronized (this) {
Map<String, RicConfig> newRicConfigs = new HashMap<>();
@@
-109,6
+124,9
@@
public class ApplicationConfig {
this.ricConfigs = newRicConfigs;
}
notifyObservers(notifications);
this.ricConfigs = newRicConfigs;
}
notifyObservers(notifications);
+
+ this.dmaapPublisherConfig = dmaapPublisherConfig;
+ this.dmaapConsumerConfig = dmaapConsumerConfig;
}
private void notifyObservers(Collection<Notification> notifications) {
}
private void notifyObservers(Collection<Notification> notifications) {