diff options
author | 2017-09-11 15:45:37 +0300 | |
---|---|---|
committer | 2017-09-12 10:38:35 +0300 | |
commit | c8a540b3c234449163f6fb1899807bba951113b4 (patch) | |
tree | a8aae0dd0f6a0feb27369914e9e3fa321740e7ed /openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration | |
parent | 82d454fd3e8c9fdf66517d01a99019a379dbfdb6 (diff) |
Create new VSP, onboard from TOSCA file - UI
Change-Id: I018c6d07a4b9ec7e6b1507ab37e2550865423cfe
Issue-ID: SDC-230
Signed-off-by: shrek2000 <orenkle@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration')
-rw-r--r-- | openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java new file mode 100644 index 0000000000..04e64c33a9 --- /dev/null +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java @@ -0,0 +1,32 @@ +package org.openecomp.core.utilities.orchestration; + +import java.util.Optional; + +import static java.util.Arrays.asList; +public enum OnboardingTypesEnum { + CSAR("csar"), ZIP("zip"), NONE("none"); + private String type; + + OnboardingTypesEnum(String type) { + this.type = type; + } + + @Override + public String toString() { + return type; + } + + public static final OnboardingTypesEnum getOnboardingTypesEnum(final String inStr) { + if (inStr == null) { + return null; + } + Optional<OnboardingTypesEnum> onboardingTypesOptional = asList(OnboardingTypesEnum.values()).stream() + .filter(onboardingTypesEnum -> onboardingTypesEnum.toString().equals(inStr)).findAny(); + if( onboardingTypesOptional.isPresent()){ + return onboardingTypesOptional.get(); + }else { + return null; + } + } + +} |