summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAjith Sreekumar <ajith.sreekumar@bell.ca>2021-07-06 13:33:46 +0000
committerGerrit Code Review <gerrit@onap.org>2021-07-06 13:33:46 +0000
commitd532d7b5e422ce3e4ef9f6992ef159960988be8f (patch)
tree98adda95982e0ff043dfdfa926c05606d54d6efd /tools
parent6092e934c6f0014ab93304c82272efed5c4b1e30 (diff)
parent5f0ec1c2d95c377fbec428f11464e93fe442b5ef (diff)
Merge "Cleanup input & outputFields from Task definition"
Diffstat (limited to 'tools')
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java49
1 files changed, 2 insertions, 47 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 81d897762..b5f6f432a 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
@@ -166,16 +166,13 @@ public class Model2Cli {
// 2: tasks
for (final AxTask t : policyModel.getTasks().getTaskMap().values()) {
final AxArtifactKey key = t.getKey();
- final List<ST> infields = getInfieldsForTask(codeGen, t);
- final List<ST> outfields = getOutfieldsForTask(codeGen, t);
final ST logic = getLogicForTask(codeGen, t);
final List<ST> parameters = getParametersForTask(codeGen, t);
final List<ST> contextRefs = getCtxtRefsForTask(codeGen, t);
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));
+ .setVersion(kig.getVersion(key)).setUuid(kig.getUuid(key)).setDescription(kig.getDesc(key))
+ .setLogic(logic).setParameters(parameters).setContextRefs(contextRefs));
}
// 3: events
@@ -313,48 +310,6 @@ public class Model2Cli {
}
/**
- * Gets the output fields for task.
- *
- * @param cg the code generator
- * @param task the task
- * @return the output fields for task
- */
- private List<ST> getOutfieldsForTask(final CodeGeneratorCliEditor cg, final AxTask task) {
- final Collection<? extends AxField> fields = task.getOutputFields().values();
- final List<ST> ret = new ArrayList<>(fields.size());
- for (final AxField f : fields) {
- final AxReferenceKey fkey = f.getKey();
-
- final ST val = cg.createTaskDefinitionOutfields(kig.getPName(fkey), kig.getPVersion(fkey),
- kig.getLName(fkey), kig.getName(f.getSchema()), kig.getVersion(f.getSchema()));
-
- ret.add(val);
- }
- return ret;
- }
-
- /**
- * Gets the input fields for task.
- *
- * @param cg the code generator
- * @param task the task
- * @return the input fields for task
- */
- private List<ST> getInfieldsForTask(final CodeGeneratorCliEditor cg, final AxTask task) {
- final Collection<? extends AxField> fields = task.getInputFields().values();
- final List<ST> ret = new ArrayList<>(fields.size());
- for (final AxField f : fields) {
- final AxReferenceKey fkey = f.getKey();
-
- final ST val = cg.createTaskDefinitionInfields(kig.getPName(fkey), kig.getPVersion(fkey),
- kig.getLName(fkey), kig.getName(f.getSchema()), kig.getVersion(f.getSchema()));
-
- ret.add(val);
- }
- return ret;
- }
-
- /**
* Gets the states for policy.
*
* @param cg the code generator