aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common')
-rw-r--r--controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java4
-rw-r--r--controlloop/common/actors/actor.test/pom.xml2
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java6
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java16
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java7
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java7
-rw-r--r--controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java8
-rw-r--r--controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java3
8 files changed, 35 insertions, 18 deletions
diff --git a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
index aac90f7a6..a31007f32 100644
--- a/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
+++ b/controlloop/common/actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SOActorServiceProvider.java
@@ -437,7 +437,7 @@ public class SOActorServiceProvider implements Actor {
/**
* @param vnfItemVnfId the vnfItemVnfId to set
*/
- private void setVnfItemVnfId(String vnfItemVnfId) {
+ private static void setVnfItemVnfId(String vnfItemVnfId) {
SOActorServiceProvider.vnfItemVnfId = vnfItemVnfId;
}
@@ -535,7 +535,7 @@ public class SOActorServiceProvider implements Actor {
/**
* @param serviceItemServiceInstanceId the serviceItemServiceInstanceId to set
*/
- private void setServiceItemServiceInstanceId(
+ private static void setServiceItemServiceInstanceId(
String serviceItemServiceInstanceId) {
SOActorServiceProvider.serviceItemServiceInstanceId = serviceItemServiceInstanceId;
}
diff --git a/controlloop/common/actors/actor.test/pom.xml b/controlloop/common/actors/actor.test/pom.xml
index 8fe05432b..c7e240ceb 100644
--- a/controlloop/common/actors/actor.test/pom.xml
+++ b/controlloop/common/actors/actor.test/pom.xml
@@ -17,7 +17,7 @@
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${settings.localRepository}/org/onap/policy/drools-applications/actor.appc/1.1.0-SNAPSHOT/actor.appc-1.1.0-SNAPSHOT.jar</additionalClasspathElement>
- <additionalClasspathElement>${settings.localRepository}/org/onap/policy/drools-applications/actor.mso/1.1.0-SNAPSHOT/actor.mso-1.1.0-SNAPSHOT.jar</additionalClasspathElement>
+ <additionalClasspathElement>${settings.localRepository}/org/onap/policy/drools-applications/actor.so/1.1.0-SNAPSHOT/actor.so-1.1.0-SNAPSHOT.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
index f891a2c6a..4b5d6c935 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
@@ -540,7 +540,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
if (vnfResponse == null) {
throw new ControlLoopException("AAI Response is null (query by vnf-id)");
}
- if (vnfResponse != null && isClosedLoopDisabled(vnfResponse) == true) {
+ if (isClosedLoopDisabled(vnfResponse) == true) {
throw new ControlLoopException("is-closed-loop-disabled is set to true");
}
} else if (event.AAI.get("generic-vnf.vnf-name") != null) {
@@ -548,7 +548,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
if (vnfResponse == null) {
throw new ControlLoopException("AAI Response is null (query by vnf-name)");
}
- if (vnfResponse != null && isClosedLoopDisabled(vnfResponse) == true) {
+ if (isClosedLoopDisabled(vnfResponse) == true) {
throw new ControlLoopException("is-closed-loop-disabled is set to true");
}
} else if (event.AAI.get("vserver.vserver-name") != null) {
@@ -556,7 +556,7 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
if (vserverResponse == null) {
throw new ControlLoopException("AAI Response is null (query by vserver-name)");
}
- if (vserverResponse != null && isClosedLoopDisabled(vserverResponse) == true) {
+ if (isClosedLoopDisabled(vserverResponse) == true) {
throw new ControlLoopException("is-closed-loop-disabled is set to true");
}
}
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
index afb847e09..9ee6f2310 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
@@ -59,9 +59,19 @@ import com.att.research.xacml.std.pip.engines.StdConfigurableEngine;
public class PIPEngineGetHistory extends StdConfigurableEngine{
+
private interface DateUtil{
+ public class DateUtilException extends Exception {
+ private static final long serialVersionUID = 2612662650481443076L;
+
+ public DateUtilException(String message) {
+ super(message);
+ }
+
+ }
+
public long getMs();
- public DateUtil init(String sqlValUnit) throws Exception;
+ public DateUtil init(String sqlValUnit) throws DateUtilException;
}
private static final Logger logger = LoggerFactory.getLogger(PIPEngineGetHistory.class);
@@ -338,10 +348,10 @@ public class PIPEngineGetHistory extends StdConfigurableEngine{
private double multiplier = 0;
@Override
- public DateUtil init(String sqlValUnit) throws Exception{
+ public DateUtil init(String sqlValUnit) throws DateUtilException{
String[] split = sqlValUnit.split(" ");
if(split.length != 2){
- throw new Exception("Invalid Value Unit pair for SQL");
+ throw new DateUtilException("Invalid Value Unit pair for SQL");
}
ms = Long.parseLong(split[0]);
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java
index 12e80d50e..2f8acf697 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java
@@ -20,13 +20,18 @@
package org.onap.policy.aai;
+import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import com.google.gson.annotations.SerializedName;
-public class RelatedToProperty {
+public class RelatedToProperty implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2088088164920423658L;
@SerializedName("related-to-property")
public List<RelatedToPropertyItem> relatedTo = new LinkedList<RelatedToPropertyItem>();
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java
index e5bc05599..2ad373104 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java
@@ -21,12 +21,17 @@
package org.onap.policy.aai;
import java.util.List;
+import java.io.Serializable;
import java.util.LinkedList;
import com.google.gson.annotations.SerializedName;
-public class RelationshipData {
+public class RelationshipData implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 6809180843309562121L;
@SerializedName("relationship-data")
public List<RelationshipDataItem> relationshipData = new LinkedList<>();
diff --git a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java
index be11942c5..6b1b624ef 100644
--- a/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java
+++ b/controlloop/common/model-impl/aai/src/test/java/org/onap/policy/aai/AAINQResponseTest.java
@@ -19,14 +19,12 @@
*/
package org.onap.policy.aai;
-import static org.junit.Assert.*;
-import java.util.List;
-import java.util.LinkedList;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.LinkedList;
import org.junit.Test;
import org.onap.policy.aai.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class AAINQResponseTest {
private static final Logger logger = LoggerFactory.getLogger(AAINQResponseTest.class);
diff --git a/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java b/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java
index dc53e267a..f5d42c9ce 100644
--- a/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java
+++ b/controlloop/common/simulators/src/test/java/org/onap/policy/simulators/AaiSimulatorTest.java
@@ -32,10 +32,9 @@ import java.util.UUID;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.onap.policy.aai.AAIGETResponse;
import org.onap.policy.aai.AAIGETVnfResponse;
-import org.onap.policy.aai.AAINQInstanceFilters;
import org.onap.policy.aai.AAIManager;
+import org.onap.policy.aai.AAINQInstanceFilters;
import org.onap.policy.aai.AAINQNamedQuery;
import org.onap.policy.aai.AAINQQueryParameters;
import org.onap.policy.aai.AAINQRequest;