Class AbstractOptionsFieldImpl

    • Constructor Detail

      • AbstractOptionsFieldImpl

        public AbstractOptionsFieldImpl()
    • Method Detail

      • isEnforceEnum

        public boolean isEnforceEnum()
        Description copied from interface: OptionsConstraint
        Returns true if enforceEnum is set, otherwise false. Whether a user can enter a value that is not present in the enum array. If set to true, a user will be able to enter any other value that is not in the list of enum. That generally means that enum is used a aid for users to enter the value but is not a validation constraint. The constraint is applicable only if the enum property is defined on the Field
        Specified by:
        isEnforceEnum in interface OptionsConstraint
        Returns:
        true if enforceEnum is set, otherwise false.
      • getEnums

        public java.lang.Object[] getEnums()
        Description copied from interface: OptionsConstraint
        Returns a list of options to put restrictions on the possible values of the field. The type of values in the enum array must match the value of the type property defined in the field.
        Specified by:
        getEnums in interface OptionsConstraint
        Returns:
        the list of enum
      • getEnumNames

        public java.lang.String[] getEnumNames()
        Description copied from interface: OptionsConstraint
        Returns a user friendly text to display for the possible options to be shown to the end user. The length of enum and enumNames array must match
        Specified by:
        getEnumNames in interface OptionsConstraint
        Returns:
        the list of enum names
      • getDefault

        public java.lang.Object[] getDefault()
        Description copied from interface: Field
        The value of the field when no value is provided by the end user or data model. The type of this property should match the value of the type property defined in the Field. If not, then a type coercion will be tried and if that fails, the value will be set to null.
        Specified by:
        getDefault in interface Field
        Overrides:
        getDefault in class AbstractFieldImpl
        Returns:
        default value of the field