diff options
Diffstat (limited to 'controlloop/common/policy-yaml/src/main')
3 files changed, 10 insertions, 4 deletions
diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java index a8edf7a81..19cca8c82 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java @@ -20,6 +20,7 @@ package org.onap.policy.controlloop.policy; +import java.io.Serializable; import java.util.LinkedList; import java.util.List; @@ -27,7 +28,8 @@ import org.onap.policy.aai.Pnf; import org.onap.policy.sdc.Resource; import org.onap.policy.sdc.Service; -public class ControlLoop { +public class ControlLoop implements Serializable { + private static final long serialVersionUID = 1L; private static final String COMPILER_VERSION = "2.0.0"; diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoopPolicy.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoopPolicy.java index 161fe1def..bbc7747e4 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoopPolicy.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoopPolicy.java @@ -20,9 +20,11 @@ package org.onap.policy.controlloop.policy; +import java.io.Serializable; import java.util.List; -public class ControlLoopPolicy { +public class ControlLoopPolicy implements Serializable { + private static final long serialVersionUID = 1L; private ControlLoop controlLoop; diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java index 8585b674b..22c58c8ab 100644 --- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java +++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java @@ -20,11 +20,13 @@ package org.onap.policy.controlloop.policy; +import java.io.Serializable; import java.util.Collections; import java.util.Map; import java.util.UUID; -public class Policy { +public class Policy implements Serializable { + private static final long serialVersionUID = 1L; private String id = UUID.randomUUID().toString(); private String name; @@ -264,7 +266,7 @@ public class Policy { } public boolean isValid() { - return id == null || name == null || actor == null || recipe == null || target == null; + return id != null && name != null && actor != null && recipe != null && target != null; } @Override |