aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorToshimichi Fukuda <t_fukuda@jp.fujitsu.com>2019-04-19 17:04:13 +0900
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-05-07 16:03:10 +0000
commit45435cd6812c1118b7751163b46618c6329a1ac1 (patch)
tree35faed932c60c9d536a5159494a2cc372676de24 /src/main/java
parentc6bdb4e477d0ad6b146ce811f32fc8356c12a226 (diff)
Add getDataTypes property for SDC list type input
Change-Id: Iba3b2a9c74914a81b3c70ad1fdc1701f1da303e1 Issue-ID: SDC-2046 Signed-off-by: Toshimichi Fukuda <t_fukuda@jp.fujitsu.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/sdc/tosca/parser/api/ISdcCsarHelper.java8
-rw-r--r--src/main/java/org/onap/sdc/tosca/parser/impl/SdcCsarHelperImpl.java8
2 files changed, 15 insertions, 1 deletions
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<IEntityDetails> getEntity(EntityQuery entityQuery, TopologyTemplateQuery topologyTemplateQuery, boolean isRecursive);
+
+ /**
+ * Get the data_types
+ * @return list of data_type value
+ */
+ HashSet<DataType> 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<DataType> getDataTypes() {
+ return toscaTemplate.getDataTypes();
+ }
-}
+ }