Class ModifiableFormItem

    • Method Detail

      • create

        public static ModifiableFormItem create()
        Construct a modifiable instance of FormItem.
        Returns:
        A new modifiable instance
      • getId

        public final String getId()
        Specified by:
        getId in interface FormItem
        Returns:
        value of id attribute, may be null
      • getType

        public final String getType()
        Specified by:
        getType in interface FormItem
        Returns:
        value of type attribute, may be null
      • getView

        public final String getView()
        Specified by:
        getView in interface FormItem
        Returns:
        value of view attribute, may be null
      • getRequired

        public final String getRequired()
        Specified by:
        getRequired in interface FormItem
        Returns:
        value of required attribute, may be null
      • getReadOnly

        public final Boolean getReadOnly()
        Specified by:
        getReadOnly in interface FormItem
        Returns:
        value of readOnly attribute, may be null
      • getActiveWhen

        public final String getActiveWhen()
        Specified by:
        getActiveWhen in interface FormItem
        Returns:
        value of activeWhen attribute, may be null
      • getCanAddRowWhen

        public final String getCanAddRowWhen()
        Specified by:
        getCanAddRowWhen in interface FormItem
        Returns:
        value of canAddRowWhen attribute, may be null
      • getCanRemoveRowWhen

        public final String getCanRemoveRowWhen()
        Specified by:
        getCanRemoveRowWhen in interface FormItem
        Returns:
        value of canRemoveRowWhen attribute, may be null
      • getValueSetId

        public final String getValueSetId()
        Specified by:
        getValueSetId in interface FormItem
        Returns:
        value of valueSetId attribute, may be null
      • getDefaultValue

        public final Object getDefaultValue()
        Specified by:
        getDefaultValue in interface FormItem
        Returns:
        value of defaultValue attribute, may be null
      • clear

        public ModifiableFormItem clear()
        Clears the object by setting all attributes to their initial values.
        Returns:
        this for use in a chained invocation
      • from

        public ModifiableFormItem from​(FormItem instance)
        Fill this modifiable instance with attribute values from the provided FormItem instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this for use in a chained invocation
      • from

        public ModifiableFormItem from​(ModifiableFormItem instance)
        Fill this modifiable instance with attribute values from the provided FormItem instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this for use in a chained invocation
      • setId

        public ModifiableFormItem setId​(String id)
        Assigns a value to the id attribute.
        Parameters:
        id - The value for id, can be null
        Returns:
        this for use in a chained invocation
      • setType

        public ModifiableFormItem setType​(String type)
        Assigns a value to the type attribute.
        Parameters:
        type - The value for type, can be null
        Returns:
        this for use in a chained invocation
      • setView

        public ModifiableFormItem setView​(String view)
        Assigns a value to the view attribute.
        Parameters:
        view - The value for view, can be null
        Returns:
        this for use in a chained invocation
      • putLabel

        public ModifiableFormItem putLabel​(String key,
                                           String value)
        Put one entry to the label map.
        Parameters:
        key - The key in label map
        value - The associated value in the label map
        Returns:
        this for use in a chained invocation
      • setLabel

        public ModifiableFormItem setLabel​(Map<String,​? extends String> entries)
        Sets or replaces all mappings from the specified map as entries for the label map. Nulls are not permitted as keys or values.
        Parameters:
        entries - The entries that will be added to the label map
        Returns:
        this for use in a chained invocation
      • putAllLabel

        public ModifiableFormItem putAllLabel​(Map<String,​? extends String> entries)
        Put all mappings from the specified map as entries to the label map. Nulls are not permitted as keys or values.
        Parameters:
        entries - to be added to label map
        Returns:
        this for use in a chained invocation
      • putDescription

        public ModifiableFormItem putDescription​(String key,
                                                 String value)
        Put one entry to the description map.
        Parameters:
        key - The key in description map
        value - The associated value in the description map
        Returns:
        this for use in a chained invocation
      • setDescription

        public ModifiableFormItem setDescription​(Map<String,​? extends String> entries)
        Sets or replaces all mappings from the specified map as entries for the description map. Nulls are not permitted as keys or values.
        Parameters:
        entries - The entries that will be added to the description map
        Returns:
        this for use in a chained invocation
      • putAllDescription

        public ModifiableFormItem putAllDescription​(Map<String,​? extends String> entries)
        Put all mappings from the specified map as entries to the description map. Nulls are not permitted as keys or values.
        Parameters:
        entries - to be added to description map
        Returns:
        this for use in a chained invocation
      • setRequired

        public ModifiableFormItem setRequired​(String required)
        Assigns a value to the required attribute.
        Parameters:
        required - The value for required, can be null
        Returns:
        this for use in a chained invocation
      • putRequiredErrorText

        public ModifiableFormItem putRequiredErrorText​(String key,
                                                       String value)
        Put one entry to the requiredErrorText map.
        Parameters:
        key - The key in requiredErrorText map
        value - The associated value in the requiredErrorText map
        Returns:
        this for use in a chained invocation
      • setRequiredErrorText

        public ModifiableFormItem setRequiredErrorText​(Map<String,​? extends String> entries)
        Sets or replaces all mappings from the specified map as entries for the requiredErrorText map. Nulls are not permitted as keys or values.
        Parameters:
        entries - The entries that will be added to the requiredErrorText map
        Returns:
        this for use in a chained invocation
      • putAllRequiredErrorText

        public ModifiableFormItem putAllRequiredErrorText​(Map<String,​? extends String> entries)
        Put all mappings from the specified map as entries to the requiredErrorText map. Nulls are not permitted as keys or values.
        Parameters:
        entries - to be added to requiredErrorText map
        Returns:
        this for use in a chained invocation
      • setReadOnly

        public ModifiableFormItem setReadOnly​(Boolean readOnly)
        Assigns a value to the readOnly attribute.
        Parameters:
        readOnly - The value for readOnly, can be null
        Returns:
        this for use in a chained invocation
      • addItems

        public ModifiableFormItem addItems​(String element)
        Adds one element to items list.
        Parameters:
        element - The items element
        Returns:
        this for use in a chained invocation
      • addItems

        public final ModifiableFormItem addItems​(String... elements)
        Adds elements to items list.
        Parameters:
        elements - An array of items elements
        Returns:
        this for use in a chained invocation
      • setItems

        public ModifiableFormItem setItems​(Iterable<String> elements)
        Sets or replaces all elements for items list.
        Parameters:
        elements - An iterable of items elements
        Returns:
        this for use in a chained invocation
      • addAllItems

        public ModifiableFormItem addAllItems​(Iterable<String> elements)
        Adds elements to items list.
        Parameters:
        elements - An iterable of items elements
        Returns:
        this for use in a chained invocation
      • addClassName

        public ModifiableFormItem addClassName​(String element)
        Adds one element to className list.
        Parameters:
        element - The className element
        Returns:
        this for use in a chained invocation
      • addClassName

        public final ModifiableFormItem addClassName​(String... elements)
        Adds elements to className list.
        Parameters:
        elements - An array of className elements
        Returns:
        this for use in a chained invocation
      • setClassName

        public ModifiableFormItem setClassName​(Iterable<String> elements)
        Sets or replaces all elements for className list.
        Parameters:
        elements - An iterable of className elements
        Returns:
        this for use in a chained invocation
      • addAllClassName

        public ModifiableFormItem addAllClassName​(Iterable<String> elements)
        Adds elements to className list.
        Parameters:
        elements - An iterable of className elements
        Returns:
        this for use in a chained invocation
      • setActiveWhen

        public ModifiableFormItem setActiveWhen​(String activeWhen)
        Assigns a value to the activeWhen attribute.
        Parameters:
        activeWhen - The value for activeWhen, can be null
        Returns:
        this for use in a chained invocation
      • setCanAddRowWhen

        public ModifiableFormItem setCanAddRowWhen​(String canAddRowWhen)
        Assigns a value to the canAddRowWhen attribute.
        Parameters:
        canAddRowWhen - The value for canAddRowWhen, can be null
        Returns:
        this for use in a chained invocation
      • setCanRemoveRowWhen

        public ModifiableFormItem setCanRemoveRowWhen​(String canRemoveRowWhen)
        Assigns a value to the canRemoveRowWhen attribute.
        Parameters:
        canRemoveRowWhen - The value for canRemoveRowWhen, can be null
        Returns:
        this for use in a chained invocation
      • addValidations

        public ModifiableFormItem addValidations​(Validation element)
        Adds one element to validations list.
        Parameters:
        element - The validations element
        Returns:
        this for use in a chained invocation
      • addValidations

        public final ModifiableFormItem addValidations​(Validation... elements)
        Adds elements to validations list.
        Parameters:
        elements - An array of validations elements
        Returns:
        this for use in a chained invocation
      • setValidations

        public ModifiableFormItem setValidations​(Iterable<? extends Validation> elements)
        Sets or replaces all elements for validations list.
        Parameters:
        elements - An iterable of validations elements
        Returns:
        this for use in a chained invocation
      • addAllValidations

        public ModifiableFormItem addAllValidations​(Iterable<? extends Validation> elements)
        Adds elements to validations list.
        Parameters:
        elements - An iterable of validations elements
        Returns:
        this for use in a chained invocation
      • setValueSetId

        public ModifiableFormItem setValueSetId​(String valueSetId)
        Assigns a value to the valueSetId attribute.
        Parameters:
        valueSetId - The value for valueSetId, can be null
        Returns:
        this for use in a chained invocation
      • setDefaultValue

        public ModifiableFormItem setDefaultValue​(Object defaultValue)
        Assigns a value to the defaultValue attribute.
        Parameters:
        defaultValue - The value for defaultValue, can be null
        Returns:
        this for use in a chained invocation
      • putProps

        public ModifiableFormItem putProps​(String key,
                                           Object value)
        Put one entry to the props map.
        Parameters:
        key - The key in props map
        value - The associated value in the props map
        Returns:
        this for use in a chained invocation
      • setProps

        public ModifiableFormItem setProps​(Map<String,​? extends Object> entries)
        Sets or replaces all mappings from the specified map as entries for the props map. Nulls are not permitted as keys or values.
        Parameters:
        entries - The entries that will be added to the props map, can be null
        Returns:
        this for use in a chained invocation
      • putAllProps

        public ModifiableFormItem putAllProps​(Map<String,​? extends Object> entries)
        Put all mappings from the specified map as entries to the props map. Nulls are not permitted as keys or values.
        Parameters:
        entries - to be added to props map
        Returns:
        this for use in a chained invocation
      • putAdditionalProperties

        public ModifiableFormItem putAdditionalProperties​(String key,
                                                          Object value)
        Put one entry to the additionalProperties map.
        Parameters:
        key - The key in additionalProperties map
        value - The associated value in the additionalProperties map
        Returns:
        this for use in a chained invocation
      • setAdditionalProperties

        public ModifiableFormItem setAdditionalProperties​(Map<String,​? extends Object> entries)
        Sets or replaces all mappings from the specified map as entries for the additionalProperties map. Nulls are not permitted as keys or values.
        Parameters:
        entries - The entries that will be added to the additionalProperties map
        Returns:
        this for use in a chained invocation
      • putAllAdditionalProperties

        public ModifiableFormItem putAllAdditionalProperties​(Map<String,​? extends Object> entries)
        Put all mappings from the specified map as entries to the additionalProperties map. Nulls are not permitted as keys or values.
        Parameters:
        entries - to be added to additionalProperties map
        Returns:
        this for use in a chained invocation
      • isInitialized

        public final boolean isInitialized()
        Returns true if all required attributes are set, indicating that the object is initialized.
        Returns:
        true if set
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ModifiableFormItem that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: id, type, view, label, description, required, requiredErrorText, readOnly, items, className, activeWhen, canAddRowWhen, canRemoveRowWhen, validations, valueSetId, defaultValue, props, additionalProperties.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Generates a string representation of this FormItem. If uninitialized, some attribute values may appear as question marks.
        Overrides:
        toString in class Object
        Returns:
        A string representation