diff options
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 00000000..bc2513ea --- /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); + } + + + + + +} |