diff options
author | Jim Hahn <jrh3@att.com> | 2018-09-12 18:01:03 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2018-09-12 18:01:03 -0400 |
commit | 97956f188f4a8d92d734bf491d5e15a78a03459f (patch) | |
tree | c3524bbb27e5880b9deaa94e3840991dea7b15cf /controlloop/common/policy-yaml/src/main | |
parent | dbecba3a4baffacf9f2da82592b3e3a9e2929f21 (diff) |
implement Serializable in additional classes
Change-Id: I5d5acb9d71dc49eaa9fb397da5988ba3d8bd5f1d
Issue-ID: POLICY-1106
Signed-off-by: Jim Hahn <jrh3@att.com>
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 |