summaryrefslogtreecommitdiffstats
path: root/common-be/src/main
diff options
context:
space:
mode:
authorFrancis Toth <francis.toth@yoppworks.com>2020-05-02 10:16:17 -0400
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-05-27 06:41:28 +0000
commit18ae7612481c386db22fe983dedf331a29141444 (patch)
treeb197c3e9d16f122dc66bd53c803169ec92a59074 /common-be/src/main
parent9373e4f17236dc7496cd7dcfbbd159675e839e55 (diff)
Refactor CsarUtils::WriteArtifactDefinition
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: I167a05d8fbc2085a3e25eeb5bfd6b30f0e80462e Issue-ID: SDC-2812
Diffstat (limited to 'common-be/src/main')
-rw-r--r--common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java
index 7360c03f44..3b52eb97df 100644
--- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java
+++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java
@@ -27,8 +27,7 @@ import org.openecomp.sdc.common.api.ArtifactGroupTypeEnum;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-
-//import com.google.gson.reflect.TypeToken;
+import org.openecomp.sdc.common.api.ArtifactTypeEnum;
public class ArtifactDataDefinition extends ToscaDataDefinition {
@@ -92,6 +91,10 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE);
}
+ public boolean isHeatEnvType() {
+ return getArtifactType().equals(ArtifactTypeEnum.HEAT_ENV.getType());
+ }
+
public void setArtifactType(String artifactType) {
setToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE, artifactType);
@@ -205,6 +208,10 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
return (String) getToscaPresentationValue(JsonPresentationFields.ES_ID);
}
+ public boolean hasNoMandatoryEsId() {
+ return getEsId() == null && getMandatory();
+ }
+
public void setEsId(String esId) {
setToscaPresentationValue(JsonPresentationFields.ES_ID, esId);
}