From 45435cd6812c1118b7751163b46618c6329a1ac1 Mon Sep 17 00:00:00 2001 From: Toshimichi Fukuda Date: Fri, 19 Apr 2019 17:04:13 +0900 Subject: Add getDataTypes property for SDC list type input Change-Id: Iba3b2a9c74914a81b3c70ad1fdc1701f1da303e1 Issue-ID: SDC-2046 Signed-off-by: Toshimichi Fukuda --- src/main/java/org/onap/sdc/tosca/parser/api/ISdcCsarHelper.java | 8 ++++++++ .../java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/onap') diff --git a/src/main/java/org/onap/sdc/tosca/parser/api/ISdcCsarHelper.java b/src/main/java/org/onap/sdc/tosca/parser/api/ISdcCsarHelper.java index 12edd55..459cb53 100644 --- a/src/main/java/org/onap/sdc/tosca/parser/api/ISdcCsarHelper.java +++ b/src/main/java/org/onap/sdc/tosca/parser/api/ISdcCsarHelper.java @@ -20,6 +20,7 @@ package org.onap.sdc.tosca.parser.api; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Map; @@ -29,6 +30,7 @@ import org.onap.sdc.tosca.parser.elements.queries.EntityQuery; import org.onap.sdc.tosca.parser.enums.SdcTypes; import org.onap.sdc.tosca.parser.enums.FilterType; import org.onap.sdc.toscaparser.api.*; +import org.onap.sdc.toscaparser.api.elements.DataType; import org.onap.sdc.toscaparser.api.elements.InterfacesDef; import org.onap.sdc.toscaparser.api.elements.Metadata; import org.onap.sdc.toscaparser.api.parameters.Input; @@ -670,4 +672,10 @@ public interface ISdcCsarHelper { * If either no entities found or the provided query is incorrect, an empty list is returned */ List getEntity(EntityQuery entityQuery, TopologyTemplateQuery topologyTemplateQuery, boolean isRecursive); + + /** + * Get the data_types + * @return list of data_type value + */ + HashSet getDataTypes(); } \ No newline at end of file diff --git a/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java b/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java index 01c72d4..8385df7 100644 --- a/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java +++ b/src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -58,6 +59,7 @@ import org.onap.sdc.toscaparser.api.RequirementAssignments; import org.onap.sdc.toscaparser.api.SubstitutionMappings; import org.onap.sdc.toscaparser.api.TopologyTemplate; import org.onap.sdc.toscaparser.api.ToscaTemplate; +import org.onap.sdc.toscaparser.api.elements.DataType; import org.onap.sdc.toscaparser.api.elements.InterfacesDef; import org.onap.sdc.toscaparser.api.elements.Metadata; import org.onap.sdc.toscaparser.api.elements.NodeType; @@ -1220,5 +1222,9 @@ public class SdcCsarHelperImpl implements ISdcCsarHelper { return new QueryProcessor(toscaTemplate, entityQuery, topologyTemplateQuery, isRecursive).doQuery(); } + @Override + public HashSet getDataTypes() { + return toscaTemplate.getDataTypes(); + } -} + } -- cgit 1.2.3-korg