X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fclamp%2Fpolicy%2Fmicroservice%2FMicroServicePolicy.java;h=b1cea34b80e7922c8b67b2f542c6078e0408032a;hb=f0d7a9645a2b773df5d278d3858ce36a61f23645;hp=d8d15a5b29e6234351802c45dfc3454bae79dc99;hpb=0387f232b4a56e98092519ccc2e0ee7985f6701c;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 d8d15a5b..b1cea34b 100644 --- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java +++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java @@ -104,25 +104,20 @@ public class MicroServicePolicy implements Serializable, Policy { * The constructor that create the json representation from the policyTosca * using the ToscaYamlToJsonConvertor. * - * @param name - * The name of the MicroService - * @param modelType - * The model type of the MicroService - * @param policyTosca - * The policy Tosca of the MicroService - * @param shared - * The flag indicate whether the MicroService is shared - * @param usedByLoops - * The list of loops that uses this MicroService + * @param name The name of the MicroService + * @param modelType The model type of the MicroService + * @param policyTosca The policy Tosca of the MicroService + * @param shared The flag indicate whether the MicroService is shared + * @param usedByLoops The list of loops that uses this MicroService */ public MicroServicePolicy(String name, String modelType, String policyTosca, Boolean shared, - Set usedByLoops) { + Set usedByLoops) { this.name = name; this.modelType = modelType; this.policyTosca = policyTosca; this.shared = shared; this.jsonRepresentation = JsonUtils.GSON_JPA_MODEL - .fromJson(new ToscaYamlToJsonConvertor(null).parseToscaYaml(policyTosca), JsonObject.class); + .fromJson(new ToscaYamlToJsonConvertor().parseToscaYaml(policyTosca), JsonObject.class); this.usedByLoops = usedByLoops; } @@ -136,21 +131,16 @@ public class MicroServicePolicy implements Serializable, Policy { * The constructor that does not make use of ToscaYamlToJsonConvertor but take * the jsonRepresentation instead. * - * @param name - * The name of the MicroService - * @param modelType - * The model type of the MicroService - * @param policyTosca - * The policy Tosca of the MicroService - * @param shared - * The flag indicate whether the MicroService is shared - * @param jsonRepresentation - * The UI representation in json format - * @param usedByLoops - * The list of loops that uses this MicroService + * @param name The name of the MicroService + * @param modelType The model type of the MicroService + * @param policyTosca The policy Tosca of the MicroService + * @param shared The flag indicate whether the MicroService is + * shared + * @param jsonRepresentation The UI representation in json format + * @param usedByLoops The list of loops that uses this MicroService */ public MicroServicePolicy(String name, String modelType, String policyTosca, Boolean shared, - JsonObject jsonRepresentation, Set usedByLoops) { + JsonObject jsonRepresentation, Set usedByLoops) { this.name = name; this.modelType = modelType; this.policyTosca = policyTosca; @@ -245,7 +235,7 @@ public class MicroServicePolicy implements Serializable, Policy { private String getMicroServicePropertyNameFromTosca(JsonObject object) { return object.getAsJsonObject("policy_types").getAsJsonObject(this.modelType).getAsJsonObject("properties") - .keySet().toArray(new String[1])[0]; + .keySet().toArray(new String[1])[0]; } @Override