diff options
author | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-07-10 14:20:54 +0300 |
---|---|---|
committer | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-07-10 14:20:54 +0300 |
commit | c72d565bb58226b20625b2bce5f0019046bee649 (patch) | |
tree | 8658e49595705b02e47ddc14afa20d6bb7123547 /vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/InputProperties.java | |
parent | ef8a6b47847012fd59ea20da21d8d3d7c4a301ed (diff) |
Merge 1806 code of vid-common
Change-Id: I75d52abed4a24dfe3827d79edc4a2938726aa87a
Issue-ID: VID-208
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/InputProperties.java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/InputProperties.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/InputProperties.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/InputProperties.java new file mode 100644 index 000000000..bc2513ea9 --- /dev/null +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/InputProperties.java @@ -0,0 +1,63 @@ +package org.onap.vid.asdc.beans.tosca; + +import org.onap.sdc.toscaparser.api.Property; + +import java.util.List; + +public class InputProperties { + private String sourceType; + private String vfModuleLabel; + private String paramName; + + public InputProperties(){ + + } + + public InputProperties(List<Property> properties) { + for(Property property: properties) { + if (property.getName().equals("source_type")) { + this.sourceType = (String)property.getValue(); + continue; + } else if (property.getName().equals("param_name")) { + this.paramName = (String)property.getValue(); + continue; + } else if (property.getName().equals("vf_module_label")) { + this.vfModuleLabel = getPropertyValueAsString(property); + continue; + } + } + } + + public String getSourceType() { + return sourceType; + } + + public void setSourceType(String sourceType) { + this.sourceType = sourceType; + } + + public String getVfModuleLabel() { + return vfModuleLabel; + } + + public void setVfModuleLabel(String vfModuleLabel) { + this.vfModuleLabel = vfModuleLabel; + } + + public String getParamName() { + return paramName; + } + + public void setParamName(String paramName) { + this.paramName = paramName; + } + + private String getPropertyValueAsString(Property property) { + return property.getValue().toString().substring(1, property.getValue().toString().length()-1); + } + + + + + +} |