summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-02-27 14:55:59 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-27 14:55:59 +0000
commit3bbf5d0d753fa4ac55c9e5a31ae450a5bcfc6a28 (patch)
treebf0b8484789e6f6bce6bda0df2b11294f9d078f1 /tools
parent94db579b98a2432fe592d09be9c96fd82ab63ad3 (diff)
parent517610a8a99a416ba4e81b333dea7deca10caed2 (diff)
Merge "Fix sonar code smell"
Diffstat (limited to 'tools')
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java8
1 files changed, 6 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 4d2e99b23..f5f0d6625 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
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,6 +35,7 @@ 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.auth.clicodegen.TaskDeclarationBuilder;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
@@ -168,8 +170,10 @@ public class Model2Cli {
final List<ST> parameters = getParametersForTask(codeGen, t);
final List<ST> contextRefs = getCtxtRefsForTask(codeGen, t);
- codeGen.addTaskDeclaration(kig.getName(key), kig.getVersion(key), kig.getUuid(key), kig.getDesc(key),
- infields, outfields, logic, parameters, contextRefs);
+ codeGen.addTaskDeclaration(new TaskDeclarationBuilder().setName(kig.getName(key))
+ .setVersion(kig.getVersion(key)).setUuid(kig.getUuid(key))
+ .setDescription(kig.getDesc(key)).setInfields(infields).setOutfields(outfields)
+ .setLogic(logic).setParameters(parameters).setContextRefs(contextRefs));
}
// 3: events