Support for concat TOSCA function
[sdc.git] / common-be / src / main / java / org / openecomp / sdc / be / datatypes / enums / PropertySource.java
index 8086d22..d2e1503 100644 (file)
@@ -21,6 +21,8 @@
 
 package org.openecomp.sdc.be.datatypes.enums;
 
+import java.util.Arrays;
+import java.util.Optional;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
 
@@ -31,4 +33,8 @@ public enum PropertySource {
 
     private final String name;
 
+    public static Optional<PropertySource> findType(final String propertySource) {
+        return Arrays.stream(values()).filter(propertySource1 -> propertySource1.getName().equalsIgnoreCase(propertySource)).findFirst();
+    }
+
 }