Enum Class AttributeDefValidationDef
java.lang.Object
java.lang.Enum<AttributeDefValidationDef>
edu.internet2.middleware.grouper.attr.AttributeDefValidationDef
- All Implemented Interfaces:
AttributeDefValidationInterface
,Serializable
,Comparable<AttributeDefValidationDef>
,Constable
public enum AttributeDefValidationDef
extends Enum<AttributeDefValidationDef>
implements AttributeDefValidationInterface
definitions of validations
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionformatting of dateTime, the mask.dont trim the value before saving.length in chars must be a certain value, not less not morelength in chars cannot be more than this amountlength in chars must be at least this amountvalidate based on regexif the value is required when the attribute is assignedcapitalize words so each is lower and starts with uppermake the string to lowermake the string caps -
Method Summary
Modifier and TypeMethodDescriptionstatic int
argumentInt
(AttributeDefValidationInterface attributeDefValidationInterface, String argument, int argumentIndex) make sure this argument is an intstatic void
argumentNone
(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) make sure there are no argumentstatic void
argumentOne
(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) make sure there is one argumentstatic int
argumentOneInt
(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) should have 1 argument, as intstatic String
argumentOneString
(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) should have 1 argument, as stringformatFromDb
(Object input, String argument0, String argument1) format an inputformatToDb
(Object input, String argument0, String argument1) format an inputstatic int
validate that an object is not nullstatic AttributeDefValidationDef
Returns the enum constant of this class with the specified name.static AttributeDefValidationDef[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface edu.internet2.middleware.grouper.attr.AttributeDefValidationInterface
name
-
Enum Constant Details
-
exactLength
length in chars must be a certain value, not less not more -
minLength
length in chars must be at least this amount -
maxLength
length in chars cannot be more than this amount -
regex
validate based on regex -
required
if the value is required when the attribute is assigned -
dateTimeMask
formatting of dateTime, the mask. Like a java SimpleDateFormat, e.g. mm/dd/ccyy -
dontTrim
dont trim the value before saving. note: the logic will look at this one -
stringToUpper
make the string caps -
stringToLower
make the string to lower -
stringCapitalizeWords
capitalize words so each is lower and starts with upper
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
formatFromDb
Description copied from interface:AttributeDefValidationInterface
format an input- Specified by:
formatFromDb
in interfaceAttributeDefValidationInterface
- Parameters:
input
- could be integer, string, double, or memberId- Returns:
- the representation for a screen
- See Also:
-
formatToDb
Description copied from interface:AttributeDefValidationInterface
format an input- Specified by:
formatToDb
in interfaceAttributeDefValidationInterface
- Returns:
- the string, integer, double, or memberId
- See Also:
-
validate
Description copied from interface:AttributeDefValidationInterface
validate that an object is not null- Specified by:
validate
in interfaceAttributeDefValidationInterface
- Returns:
- the error string if there is one
- See Also:
-
argumentOneInt
public static int argumentOneInt(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) should have 1 argument, as int- Parameters:
argument0
-argument1
-- Returns:
- the int
-
argumentOneString
public static String argumentOneString(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) should have 1 argument, as string- Parameters:
argument0
-argument1
-- Returns:
- the string
-
argumentInt
public static int argumentInt(AttributeDefValidationInterface attributeDefValidationInterface, String argument, int argumentIndex) make sure this argument is an int- Parameters:
attributeDefValidationInterface
-argument
-argumentIndex
-
-
argumentOne
public static void argumentOne(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) make sure there is one argument -
argumentNone
public static void argumentNone(AttributeDefValidationInterface attributeDefValidationInterface, String argument0, String argument1) make sure there are no argument -
length
- Parameters:
object
-- Returns:
-