diff options
Diffstat (limited to 'catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintType.java')
-rw-r--r-- | catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintType.java | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintType.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintType.java index bce2a41b98..3647bd67d0 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintType.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintType.java @@ -7,9 +7,9 @@ * 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. @@ -17,35 +17,25 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.be.model.tosca.constraints; import java.util.Arrays; import java.util.List; public enum ConstraintType { - - EQUAL("equal", "equal"), - + // @formatter:off + EQUAL("equal", "equal"), IN_RANGE("inRange", "in_range"), - GREATER_THAN("greaterThan", "greater_than"), - GREATER_OR_EQUAL("greaterOrEqual", "greater_or_equal"), - LESS_OR_EQUAL("lessOrEqual", "less_or_equal"), - LENGTH("length", "length"), - MIN_LENGTH("minLength", "min_length"), - MAX_LENGTH("maxLength", "max_length"), - VALID_VALUES("validValues", "valid_values"), - LESS_THAN("lessThan", "less_than"), - SCHEMA("schema", "schema"); + // @formatter:on List<String> types; @@ -53,10 +43,6 @@ public enum ConstraintType { this.types = Arrays.asList(types); } - public List<String> getTypes() { - return types; - } - public static ConstraintType getByType(String type) { for (ConstraintType inst : ConstraintType.values()) { if (inst.getTypes().contains(type)) { @@ -65,4 +51,8 @@ public enum ConstraintType { } return null; } + + public List<String> getTypes() { + return types; + } } |