aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/main/java/com/att/sdc/validation/datatypes/AttValetGroupTypeValues.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/main/java/com/att/sdc/validation/datatypes/AttValetGroupTypeValues.java')
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/main/java/com/att/sdc/validation/datatypes/AttValetGroupTypeValues.java53
1 files changed, 53 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/main/java/com/att/sdc/validation/datatypes/AttValetGroupTypeValues.java b/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/main/java/com/att/sdc/validation/datatypes/AttValetGroupTypeValues.java
new file mode 100644
index 0000000000..08647b18af
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/att-sdc-validation-impl/src/main/java/com/att/sdc/validation/datatypes/AttValetGroupTypeValues.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SDC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package com.att.sdc.validation.datatypes;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public enum AttValetGroupTypeValues {
+ EXCLUSIVITY("exclusivity"),
+ AFFINITY("affinity"),
+ DIVERSITY("diversity");
+
+ private static List<String> groupTypeAsStrings;
+
+ static {
+ groupTypeAsStrings = new ArrayList<>();
+ for (AttValetGroupTypeValues attGroupTypeValue : AttValetGroupTypeValues.values()) {
+ groupTypeAsStrings.add(attGroupTypeValue.groupTypeValue);
+ }
+ }
+
+ private String groupTypeValue;
+
+ AttValetGroupTypeValues(String groupTypeValue) {
+ this.groupTypeValue = groupTypeValue;
+ }
+
+ public static boolean isGroupTypeValid(Object groupType) {
+ if (groupType instanceof Map) {
+ return true;
+ }
+ return groupTypeAsStrings.contains(groupType);
+ }
+}