Package io.dialob.api.form
Class ModifiableFormItem
java.lang.Object
io.dialob.api.form.ModifiableFormItem
- All Implemented Interfaces:
FormItem,Serializable
@ParametersAreNonnullByDefault
@Generated({"Modifiables.generator","FormItem"})
@NotThreadSafe
public final class ModifiableFormItem
extends Object
implements FormItem
A modifiable implementation of the
FormItem type.
Use the create() static factory methods to create new instances.
Use the toImmutable() method to convert to canonical immutable instances.
ModifiableFormItem is not thread-safe
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddAllClassName(Iterable<String> elements) Adds elements toclassNamelist.addAllItems(Iterable<String> elements) Adds elements toitemslist.addAllValidations(Iterable<? extends Validation> elements) Adds elements tovalidationslist.addClassName(String element) Adds one element toclassNamelist.final ModifiableFormItemaddClassName(String... elements) Adds elements toclassNamelist.Adds one element toitemslist.final ModifiableFormItemAdds elements toitemslist.addValidations(Validation element) Adds one element tovalidationslist.final ModifiableFormItemaddValidations(Validation... elements) Adds elements tovalidationslist.clear()Clears the object by setting all attributes to their initial values.static ModifiableFormItemcreate()Construct a modifiable instance ofFormItem.booleanThis instance is equal to all instances ofModifiableFormItemthat have equal attribute values.Fill this modifiable instance with attribute values from the providedFormIteminstance.from(ModifiableFormItem instance) Fill this modifiable instance with attribute values from the providedFormIteminstance.final Stringfinal Stringfinal Stringfinal Objectfinal StringgetId()getItems()getLabel()getProps()final Booleanfinal Stringfinal StringgetType()final List<Validation>final Stringfinal StringgetView()inthashCode()Computes a hash code from attributes:id,type,view,label,description,required,requiredErrorText,readOnly,items,className,activeWhen,canAddRowWhen,canRemoveRowWhen,validations,valueSetId,defaultValue,props,additionalProperties.final booleanReturnstrueif all required attributes are set, indicating that the object is initialized.putAdditionalProperties(String key, Object value) Put one entry to theadditionalPropertiesmap.putAllAdditionalProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries to theadditionalPropertiesmap.putAllDescription(Map<String, ? extends String> entries) Put all mappings from the specified map as entries to thedescriptionmap.putAllLabel(Map<String, ? extends String> entries) Put all mappings from the specified map as entries to thelabelmap.putAllProps(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries to thepropsmap.putAllRequiredErrorText(Map<String, ? extends String> entries) Put all mappings from the specified map as entries to therequiredErrorTextmap.putDescription(String key, String value) Put one entry to thedescriptionmap.Put one entry to thelabelmap.Put one entry to thepropsmap.putRequiredErrorText(String key, String value) Put one entry to therequiredErrorTextmap.setActiveWhen(String activeWhen) Assigns a value to theactiveWhenattribute.setAdditionalProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap.setCanAddRowWhen(String canAddRowWhen) Assigns a value to thecanAddRowWhenattribute.setCanRemoveRowWhen(String canRemoveRowWhen) Assigns a value to thecanRemoveRowWhenattribute.setClassName(Iterable<String> elements) Sets or replaces all elements forclassNamelist.setDefaultValue(Object defaultValue) Assigns a value to thedefaultValueattribute.setDescription(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thedescriptionmap.Assigns a value to theidattribute.Sets or replaces all elements foritemslist.Sets or replaces all mappings from the specified map as entries for thelabelmap.Sets or replaces all mappings from the specified map as entries for thepropsmap.setReadOnly(Boolean readOnly) Assigns a value to thereadOnlyattribute.setRequired(String required) Assigns a value to therequiredattribute.setRequiredErrorText(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for therequiredErrorTextmap.Assigns a value to thetypeattribute.setValidations(Iterable<? extends Validation> elements) Sets or replaces all elements forvalidationslist.setValueSetId(String valueSetId) Assigns a value to thevalueSetIdattribute.Assigns a value to theviewattribute.final ImmutableFormItemConverts toImmutableFormItem.toString()Generates a string representation of thisFormItem.
-
Method Details
-
create
Construct a modifiable instance ofFormItem.- Returns:
- A new modifiable instance
-
getId
-
getType
-
getView
-
getLabel
-
getDescription
- Specified by:
getDescriptionin interfaceFormItem- Returns:
- value of
descriptionattribute
-
getRequired
- Specified by:
getRequiredin interfaceFormItem- Returns:
- value of
requiredattribute, may benull
-
getRequiredErrorText
- Specified by:
getRequiredErrorTextin interfaceFormItem- Returns:
- value of
requiredErrorTextattribute
-
getReadOnly
- Specified by:
getReadOnlyin interfaceFormItem- Returns:
- value of
readOnlyattribute, may benull
-
getItems
-
getClassName
- Specified by:
getClassNamein interfaceFormItem- Returns:
- modifiable list
className
-
getActiveWhen
- Specified by:
getActiveWhenin interfaceFormItem- Returns:
- value of
activeWhenattribute, may benull
-
getCanAddRowWhen
- Specified by:
getCanAddRowWhenin interfaceFormItem- Returns:
- value of
canAddRowWhenattribute, may benull
-
getCanRemoveRowWhen
- Specified by:
getCanRemoveRowWhenin interfaceFormItem- Returns:
- value of
canRemoveRowWhenattribute, may benull
-
getValidations
- Specified by:
getValidationsin interfaceFormItem- Returns:
- modifiable list
validations
-
getValueSetId
- Specified by:
getValueSetIdin interfaceFormItem- Returns:
- value of
valueSetIdattribute, may benull
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceFormItem- Returns:
- value of
defaultValueattribute, may benull
-
getProps
-
getAdditionalProperties
- Specified by:
getAdditionalPropertiesin interfaceFormItem- Returns:
- value of
additionalPropertiesattribute
-
clear
Clears the object by setting all attributes to their initial values.- Returns:
thisfor use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedFormIteminstance. 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:
thisfor use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedFormIteminstance. 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:
thisfor use in a chained invocation
-
setId
Assigns a value to theidattribute.- Parameters:
id- The value for id, can benull- Returns:
thisfor use in a chained invocation
-
setType
Assigns a value to thetypeattribute.- Parameters:
type- The value for type, can benull- Returns:
thisfor use in a chained invocation
-
setView
Assigns a value to theviewattribute.- Parameters:
view- The value for view, can benull- Returns:
thisfor use in a chained invocation
-
putLabel
Put one entry to thelabelmap.- Parameters:
key- The key in label mapvalue- The associated value in the label map- Returns:
thisfor use in a chained invocation
-
setLabel
Sets or replaces all mappings from the specified map as entries for thelabelmap. Nulls are not permitted as keys or values.- Parameters:
entries- The entries that will be added to the label map- Returns:
thisfor use in a chained invocation
-
putAllLabel
Put all mappings from the specified map as entries to thelabelmap. Nulls are not permitted as keys or values.- Parameters:
entries- to be added to label map- Returns:
thisfor use in a chained invocation
-
putDescription
Put one entry to thedescriptionmap.- Parameters:
key- The key in description mapvalue- The associated value in the description map- Returns:
thisfor use in a chained invocation
-
setDescription
Sets or replaces all mappings from the specified map as entries for thedescriptionmap. Nulls are not permitted as keys or values.- Parameters:
entries- The entries that will be added to the description map- Returns:
thisfor use in a chained invocation
-
putAllDescription
Put all mappings from the specified map as entries to thedescriptionmap. Nulls are not permitted as keys or values.- Parameters:
entries- to be added to description map- Returns:
thisfor use in a chained invocation
-
setRequired
Assigns a value to therequiredattribute.- Parameters:
required- The value for required, can benull- Returns:
thisfor use in a chained invocation
-
putRequiredErrorText
Put one entry to therequiredErrorTextmap.- Parameters:
key- The key in requiredErrorText mapvalue- The associated value in the requiredErrorText map- Returns:
thisfor use in a chained invocation
-
setRequiredErrorText
Sets or replaces all mappings from the specified map as entries for therequiredErrorTextmap. Nulls are not permitted as keys or values.- Parameters:
entries- The entries that will be added to the requiredErrorText map- Returns:
thisfor use in a chained invocation
-
putAllRequiredErrorText
Put all mappings from the specified map as entries to therequiredErrorTextmap. Nulls are not permitted as keys or values.- Parameters:
entries- to be added to requiredErrorText map- Returns:
thisfor use in a chained invocation
-
setReadOnly
Assigns a value to thereadOnlyattribute.- Parameters:
readOnly- The value for readOnly, can benull- Returns:
thisfor use in a chained invocation
-
addItems
Adds one element toitemslist.- Parameters:
element- The items element- Returns:
thisfor use in a chained invocation
-
addItems
Adds elements toitemslist.- Parameters:
elements- An array of items elements- Returns:
thisfor use in a chained invocation
-
setItems
Sets or replaces all elements foritemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisfor use in a chained invocation
-
addAllItems
Adds elements toitemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisfor use in a chained invocation
-
addClassName
Adds one element toclassNamelist.- Parameters:
element- The className element- Returns:
thisfor use in a chained invocation
-
addClassName
Adds elements toclassNamelist.- Parameters:
elements- An array of className elements- Returns:
thisfor use in a chained invocation
-
setClassName
Sets or replaces all elements forclassNamelist.- Parameters:
elements- An iterable of className elements- Returns:
thisfor use in a chained invocation
-
addAllClassName
Adds elements toclassNamelist.- Parameters:
elements- An iterable of className elements- Returns:
thisfor use in a chained invocation
-
setActiveWhen
Assigns a value to theactiveWhenattribute.- Parameters:
activeWhen- The value for activeWhen, can benull- Returns:
thisfor use in a chained invocation
-
setCanAddRowWhen
Assigns a value to thecanAddRowWhenattribute.- Parameters:
canAddRowWhen- The value for canAddRowWhen, can benull- Returns:
thisfor use in a chained invocation
-
setCanRemoveRowWhen
Assigns a value to thecanRemoveRowWhenattribute.- Parameters:
canRemoveRowWhen- The value for canRemoveRowWhen, can benull- Returns:
thisfor use in a chained invocation
-
addValidations
Adds one element tovalidationslist.- Parameters:
element- The validations element- Returns:
thisfor use in a chained invocation
-
addValidations
Adds elements tovalidationslist.- Parameters:
elements- An array of validations elements- Returns:
thisfor use in a chained invocation
-
setValidations
Sets or replaces all elements forvalidationslist.- Parameters:
elements- An iterable of validations elements- Returns:
thisfor use in a chained invocation
-
addAllValidations
Adds elements tovalidationslist.- Parameters:
elements- An iterable of validations elements- Returns:
thisfor use in a chained invocation
-
setValueSetId
Assigns a value to thevalueSetIdattribute.- Parameters:
valueSetId- The value for valueSetId, can benull- Returns:
thisfor use in a chained invocation
-
setDefaultValue
Assigns a value to thedefaultValueattribute.- Parameters:
defaultValue- The value for defaultValue, can benull- Returns:
thisfor use in a chained invocation
-
putProps
Put one entry to thepropsmap.- Parameters:
key- The key in props mapvalue- The associated value in the props map- Returns:
thisfor use in a chained invocation
-
setProps
Sets or replaces all mappings from the specified map as entries for thepropsmap. Nulls are not permitted as keys or values.- Parameters:
entries- The entries that will be added to the props map, can benull- Returns:
thisfor use in a chained invocation
-
putAllProps
Put all mappings from the specified map as entries to thepropsmap. Nulls are not permitted as keys or values.- Parameters:
entries- to be added to props map- Returns:
thisfor use in a chained invocation
-
putAdditionalProperties
Put one entry to theadditionalPropertiesmap.- Parameters:
key- The key in additionalProperties mapvalue- The associated value in the additionalProperties map- Returns:
thisfor use in a chained invocation
-
setAdditionalProperties
Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap. Nulls are not permitted as keys or values.- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisfor use in a chained invocation
-
putAllAdditionalProperties
Put all mappings from the specified map as entries to theadditionalPropertiesmap. Nulls are not permitted as keys or values.- Parameters:
entries- to be added to additionalProperties map- Returns:
thisfor use in a chained invocation
-
isInitialized
public final boolean isInitialized()Returnstrueif all required attributes are set, indicating that the object is initialized.- Returns:
trueif set
-
toImmutable
Converts toImmutableFormItem.- Returns:
- An immutable instance of FormItem
-
equals
This instance is equal to all instances ofModifiableFormItemthat have equal attribute values. -
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. -
toString
Generates a string representation of thisFormItem. If uninitialized, some attribute values may appear as question marks.
-