summaryrefslogtreecommitdiffstats
path: root/tools/model-generator
diff options
context:
space:
mode:
Diffstat (limited to 'tools/model-generator')
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java14
1 files changed, 11 insertions, 3 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 01434190b..57a3841c9 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
@@ -31,6 +31,7 @@ import java.util.Map.Entry;
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.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -184,9 +185,16 @@ public class Model2Cli {
for (final AxContextAlbum a : policyModel.getAlbums().getAlbumsMap().values()) {
final AxArtifactKey key = a.getKey();
- codeGen.addContextAlbumDeclaration(kig.getName(key), kig.getVersion(key), kig.getUuid(key),
- kig.getDesc(key), a.getScope(), a.isWritable(), kig.getName(a.getItemSchema()),
- kig.getVersion(a.getItemSchema()));
+ codeGen.addContextAlbumDeclaration(
+ new CodeGenCliEditorBuilder()
+ .setName(kig.getName(key))
+ .setVersion(kig.getVersion(key))
+ .setUuid(kig.getUuid(key))
+ .setDescription(kig.getDesc(key))
+ .setScope(a.getScope())
+ .setWritable(a.isWritable())
+ .setSchemaName(kig.getName(a.getItemSchema()))
+ .setSchemaVersion(kig.getVersion(a.getItemSchema())));
}
// 5: policies