X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fclamp%2Fpolicy%2Fmicroservice%2FMicroServicePolicy.java;h=7fd752c3152f8a32b983153ecda14215efc77371;hb=635445a5f262464c88287e5b5ceace4abf9cc4bc;hp=75efca76989590c12978399606b7d38500b5be39;hpb=ae6a9829f0c572cb4789812ea65871132ec861fd;p=clamp.git diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java index 75efca76..7fd752c3 100644 --- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java +++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java @@ -121,7 +121,7 @@ public class MicroServicePolicy extends Policy implements Serializable { public MicroServicePolicy(String name, PolicyModel policyModel, Boolean shared, LoopElementModel loopElementModel) { this(name,policyModel,shared,JsonUtils.GSON_JPA_MODEL .fromJson(new ToscaYamlToJsonConvertor().parseToscaYaml(policyModel.getPolicyModelTosca(), - policyModel.getPolicyModelType()), JsonObject.class),loopElementModel); + policyModel.getPolicyModelType()), JsonObject.class),loopElementModel, null, null); } private JsonObject createJsonFromPolicyTosca() { @@ -138,15 +138,19 @@ public class MicroServicePolicy extends Policy implements Serializable { * @param shared The flag indicate whether the MicroService is * shared * @param jsonRepresentation The UI representation in json format - * @param loopElementModel The loop element model from which this instance should be created + * @param loopElementModel The loop element model from which this instance should be created + * @param pdpGroup The Pdp Group info + * @param pdpSubgroup The Pdp Subgrouop info */ public MicroServicePolicy(String name, PolicyModel policyModel, Boolean shared, - JsonObject jsonRepresentation, LoopElementModel loopElementModel) { + JsonObject jsonRepresentation, LoopElementModel loopElementModel, String pdpGroup, String pdpSubgroup) { this.name = name; this.policyModel = policyModel; this.shared = shared; this.setJsonRepresentation(jsonRepresentation); this.setLoopElementModel(loopElementModel); + this.setPdpGroup(pdpGroup); + this.setPdpSubgroup(pdpSubgroup); } @Override @@ -284,8 +288,7 @@ public class MicroServicePolicy extends Policy implements Serializable { } } else if (!name.equals(other.name)) { return false; - } - return true; + } return true; } private String getMicroServicePropertyNameFromTosca(JsonObject object) {