summaryrefslogtreecommitdiffstats
path: root/tools/model-generator
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2018-11-26 17:15:31 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-26 17:15:31 +0000
commit80540def7348e195ffacfbbc7c23e2e68e154965 (patch)
treeb4c9656d383de13728ed4f63968b28c8d6e60ee2 /tools/model-generator
parent3688d3901ad241be26671e520da0e01e4c8089c0 (diff)
parent12f38c0b199dfe60932ffbcc74bca947b61136b6 (diff)
Merge "Fix sonar issue cli codegen"
Diffstat (limited to 'tools/model-generator')
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java
index 57a3841c9..7e02c7af5 100644
--- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java
+++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java
@@ -33,6 +33,7 @@ import java.util.Properties;
import org.apache.commons.lang3.Validate;
import org.onap.policy.apex.auth.clicodegen.CodeGenCliEditorBuilder;
import org.onap.policy.apex.auth.clicodegen.CodeGeneratorCliEditor;
+import org.onap.policy.apex.auth.clicodegen.EventDeclarationBuilder;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
@@ -177,8 +178,16 @@ public class Model2Cli {
final AxArtifactKey key = e.getKey();
final List<ST> fields = getParametersForEvent(codeGen, e);
- codeGen.addEventDeclaration(kig.getName(key), kig.getVersion(key), kig.getUuid(key), kig.getDesc(key),
- e.getNameSpace(), e.getSource(), e.getTarget(), fields);
+ codeGen.addEventDeclaration(
+ new EventDeclarationBuilder()
+ .setName(kig.getName(key))
+ .setVersion(kig.getVersion(key))
+ .setUuid(kig.getUuid(key))
+ .setDescription(kig.getDesc(key))
+ .setNameSpace(e.getNameSpace())
+ .setSource(e.getSource())
+ .setTarget(e.getTarget())
+ .setFields(fields));
}
// 4: context albums