X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ECOMP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Frest%2Fjpa%2FConstraintType.java;h=60923d5a85e045e44c002f73d908615262f66e18;hb=4ca818fdfb9b807562166800a086b413593d6894;hp=73e053ce7f7e41d28b392d35e923587383948a3d;hpb=91d04c64771832a0b8815ffbe1f0f9920320d94d;p=policy%2Fengine.git diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java index 73e053ce7..60923d5a8 100644 --- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java +++ b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java @@ -41,17 +41,17 @@ import javax.persistence.Table; public class ConstraintType implements Serializable { private static final long serialVersionUID = 1L; - public static String ENUMERATION_TYPE = "Enumeration"; - public static String RANGE_TYPE = "Range"; - public static String REGEXP_TYPE = "Regular Expression"; + public static final String ENUMERATION_TYPE = "Enumeration"; + public static final String RANGE_TYPE = "Range"; + public static final String REGEXP_TYPE = "Regular Expression"; - public static Map defaults = new HashMap(); + protected static final Map defaults = new HashMap<>(); static { defaults.put(ENUMERATION_TYPE, "Enumerate a set of values that the attribute may be set to during policy creation."); defaults.put(RANGE_TYPE, "Set a range of min and/or max integer/double values the attribute can be set to during policy creation."); defaults.put(REGEXP_TYPE, "Define a regular expression the attribute must match against during policy creation."); } - public static final String[] RANGE_TYPES = {"minExclusive", "minInclusive", "maxExclusive", "maxInclusive"}; + private static final String[] RANGE_TYPES = {"minExclusive", "minInclusive", "maxExclusive", "maxInclusive"}; @Id @GeneratedValue(strategy = GenerationType.AUTO) @@ -114,4 +114,8 @@ public class ConstraintType implements Serializable { this.attributes = attributes; } + public static String[] getRangeTypes() { + return RANGE_TYPES; + } + }