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 theFormItemtype.Use the
create()static factory methods to create new instances. Use thetoImmutable()method to convert to canonical immutable instances.ModifiableFormItem is not thread-safe
- See Also:
ImmutableFormItem, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModifiableFormItemaddAllClassName(Iterable<String> elements)Adds elements toclassNamelist.ModifiableFormItemaddAllItems(Iterable<String> elements)Adds elements toitemslist.ModifiableFormItemaddAllValidations(Iterable<? extends Validation> elements)Adds elements tovalidationslist.ModifiableFormItemaddClassName(String element)Adds one element toclassNamelist.ModifiableFormItemaddClassName(String... elements)Adds elements toclassNamelist.ModifiableFormItemaddItems(String element)Adds one element toitemslist.ModifiableFormItemaddItems(String... elements)Adds elements toitemslist.ModifiableFormItemaddValidations(Validation element)Adds one element tovalidationslist.ModifiableFormItemaddValidations(Validation... elements)Adds elements tovalidationslist.ModifiableFormItemclear()Clears the object by setting all attributes to their initial values.static ModifiableFormItemcreate()Construct a modifiable instance ofFormItem.booleanequals(Object another)This instance is equal to all instances ofModifiableFormItemthat have equal attribute values.ModifiableFormItemfrom(FormItem instance)Fill this modifiable instance with attribute values from the providedFormIteminstance.ModifiableFormItemfrom(ModifiableFormItem instance)Fill this modifiable instance with attribute values from the providedFormIteminstance.StringgetActiveWhen()Map<String,Object>getAdditionalProperties()StringgetCanAddRowWhen()StringgetCanRemoveRowWhen()List<String>getClassName()ObjectgetDefaultValue()Map<String,String>getDescription()StringgetId()List<String>getItems()Map<String,String>getLabel()Map<String,Object>getProps()BooleangetReadOnly()StringgetRequired()Map<String,String>getRequiredErrorText()StringgetType()List<Validation>getValidations()StringgetValueSetId()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.booleanisInitialized()Returnstrueif all required attributes are set, indicating that the object is initialized.ModifiableFormItemputAdditionalProperties(String key, Object value)Put one entry to theadditionalPropertiesmap.ModifiableFormItemputAllAdditionalProperties(Map<String,? extends Object> entries)Put all mappings from the specified map as entries to theadditionalPropertiesmap.ModifiableFormItemputAllDescription(Map<String,? extends String> entries)Put all mappings from the specified map as entries to thedescriptionmap.ModifiableFormItemputAllLabel(Map<String,? extends String> entries)Put all mappings from the specified map as entries to thelabelmap.ModifiableFormItemputAllProps(Map<String,? extends Object> entries)Put all mappings from the specified map as entries to thepropsmap.ModifiableFormItemputAllRequiredErrorText(Map<String,? extends String> entries)Put all mappings from the specified map as entries to therequiredErrorTextmap.ModifiableFormItemputDescription(String key, String value)Put one entry to thedescriptionmap.ModifiableFormItemputLabel(String key, String value)Put one entry to thelabelmap.ModifiableFormItemputProps(String key, Object value)Put one entry to thepropsmap.ModifiableFormItemputRequiredErrorText(String key, String value)Put one entry to therequiredErrorTextmap.ModifiableFormItemsetActiveWhen(String activeWhen)Assigns a value to theactiveWhenattribute.ModifiableFormItemsetAdditionalProperties(Map<String,? extends Object> entries)Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap.ModifiableFormItemsetCanAddRowWhen(String canAddRowWhen)Assigns a value to thecanAddRowWhenattribute.ModifiableFormItemsetCanRemoveRowWhen(String canRemoveRowWhen)Assigns a value to thecanRemoveRowWhenattribute.ModifiableFormItemsetClassName(Iterable<String> elements)Sets or replaces all elements forclassNamelist.ModifiableFormItemsetDefaultValue(Object defaultValue)Assigns a value to thedefaultValueattribute.ModifiableFormItemsetDescription(Map<String,? extends String> entries)Sets or replaces all mappings from the specified map as entries for thedescriptionmap.ModifiableFormItemsetId(String id)Assigns a value to theidattribute.ModifiableFormItemsetItems(Iterable<String> elements)Sets or replaces all elements foritemslist.ModifiableFormItemsetLabel(Map<String,? extends String> entries)Sets or replaces all mappings from the specified map as entries for thelabelmap.ModifiableFormItemsetProps(Map<String,? extends Object> entries)Sets or replaces all mappings from the specified map as entries for thepropsmap.ModifiableFormItemsetReadOnly(Boolean readOnly)Assigns a value to thereadOnlyattribute.ModifiableFormItemsetRequired(String required)Assigns a value to therequiredattribute.ModifiableFormItemsetRequiredErrorText(Map<String,? extends String> entries)Sets or replaces all mappings from the specified map as entries for therequiredErrorTextmap.ModifiableFormItemsetType(String type)Assigns a value to thetypeattribute.ModifiableFormItemsetValidations(Iterable<? extends Validation> elements)Sets or replaces all elements forvalidationslist.ModifiableFormItemsetValueSetId(String valueSetId)Assigns a value to thevalueSetIdattribute.ModifiableFormItemsetView(String view)Assigns a value to theviewattribute.ImmutableFormItemtoImmutable()Converts toImmutableFormItem.StringtoString()Generates a string representation of thisFormItem.
-
-
-
Method Detail
-
create
public static ModifiableFormItem create()
Construct a modifiable instance ofFormItem.- Returns:
- A new modifiable instance
-
getId
public final String getId()
-
getType
public final String getType()
-
getView
public final String getView()
-
getDescription
public final Map<String,String> getDescription()
- Specified by:
getDescriptionin interfaceFormItem- Returns:
- value of
descriptionattribute
-
getRequired
public final String getRequired()
- Specified by:
getRequiredin interfaceFormItem- Returns:
- value of
requiredattribute, may benull
-
getRequiredErrorText
public final Map<String,String> getRequiredErrorText()
- Specified by:
getRequiredErrorTextin interfaceFormItem- Returns:
- value of
requiredErrorTextattribute
-
getReadOnly
public final Boolean getReadOnly()
- Specified by:
getReadOnlyin interfaceFormItem- Returns:
- value of
readOnlyattribute, may benull
-
getClassName
public final List<String> getClassName()
- Specified by:
getClassNamein interfaceFormItem- Returns:
- modifiable list
className
-
getActiveWhen
public final String getActiveWhen()
- Specified by:
getActiveWhenin interfaceFormItem- Returns:
- value of
activeWhenattribute, may benull
-
getCanAddRowWhen
public final String getCanAddRowWhen()
- Specified by:
getCanAddRowWhenin interfaceFormItem- Returns:
- value of
canAddRowWhenattribute, may benull
-
getCanRemoveRowWhen
public final String getCanRemoveRowWhen()
- Specified by:
getCanRemoveRowWhenin interfaceFormItem- Returns:
- value of
canRemoveRowWhenattribute, may benull
-
getValidations
public final List<Validation> getValidations()
- Specified by:
getValidationsin interfaceFormItem- Returns:
- modifiable list
validations
-
getValueSetId
public final String getValueSetId()
- Specified by:
getValueSetIdin interfaceFormItem- Returns:
- value of
valueSetIdattribute, may benull
-
getDefaultValue
public final Object getDefaultValue()
- Specified by:
getDefaultValuein interfaceFormItem- Returns:
- value of
defaultValueattribute, may benull
-
getAdditionalProperties
public final Map<String,Object> getAdditionalProperties()
- Specified by:
getAdditionalPropertiesin interfaceFormItem- Returns:
- value of
additionalPropertiesattribute
-
clear
public ModifiableFormItem clear()
Clears the object by setting all attributes to their initial values.- Returns:
thisfor use in a chained invocation
-
from
public ModifiableFormItem from(FormItem instance)
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
public ModifiableFormItem from(ModifiableFormItem instance)
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
public ModifiableFormItem setId(String id)
Assigns a value to theidattribute.- Parameters:
id- The value for id, can benull- Returns:
thisfor use in a chained invocation
-
setType
public ModifiableFormItem setType(String type)
Assigns a value to thetypeattribute.- Parameters:
type- The value for type, can benull- Returns:
thisfor use in a chained invocation
-
setView
public ModifiableFormItem setView(String view)
Assigns a value to theviewattribute.- Parameters:
view- The value for view, can benull- Returns:
thisfor use in a chained invocation
-
putLabel
public ModifiableFormItem putLabel(String key, String value)
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
public ModifiableFormItem setLabel(Map<String,? extends String> entries)
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
public ModifiableFormItem putAllLabel(Map<String,? extends String> entries)
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
public ModifiableFormItem putDescription(String key, String value)
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
public ModifiableFormItem setDescription(Map<String,? extends String> entries)
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
public ModifiableFormItem putAllDescription(Map<String,? extends String> entries)
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
public ModifiableFormItem setRequired(String required)
Assigns a value to therequiredattribute.- Parameters:
required- The value for required, can benull- Returns:
thisfor use in a chained invocation
-
putRequiredErrorText
public ModifiableFormItem putRequiredErrorText(String key, String value)
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
public ModifiableFormItem setRequiredErrorText(Map<String,? extends String> entries)
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
public ModifiableFormItem putAllRequiredErrorText(Map<String,? extends String> entries)
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
public ModifiableFormItem setReadOnly(Boolean readOnly)
Assigns a value to thereadOnlyattribute.- Parameters:
readOnly- The value for readOnly, can benull- Returns:
thisfor use in a chained invocation
-
addItems
public ModifiableFormItem addItems(String element)
Adds one element toitemslist.- Parameters:
element- The items element- Returns:
thisfor use in a chained invocation
-
addItems
public final ModifiableFormItem addItems(String... elements)
Adds elements toitemslist.- Parameters:
elements- An array of items elements- Returns:
thisfor use in a chained invocation
-
setItems
public ModifiableFormItem setItems(Iterable<String> elements)
Sets or replaces all elements foritemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisfor use in a chained invocation
-
addAllItems
public ModifiableFormItem addAllItems(Iterable<String> elements)
Adds elements toitemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisfor use in a chained invocation
-
addClassName
public ModifiableFormItem addClassName(String element)
Adds one element toclassNamelist.- Parameters:
element- The className element- Returns:
thisfor use in a chained invocation
-
addClassName
public final ModifiableFormItem addClassName(String... elements)
Adds elements toclassNamelist.- Parameters:
elements- An array of className elements- Returns:
thisfor use in a chained invocation
-
setClassName
public ModifiableFormItem setClassName(Iterable<String> elements)
Sets or replaces all elements forclassNamelist.- Parameters:
elements- An iterable of className elements- Returns:
thisfor use in a chained invocation
-
addAllClassName
public ModifiableFormItem addAllClassName(Iterable<String> elements)
Adds elements toclassNamelist.- Parameters:
elements- An iterable of className elements- Returns:
thisfor use in a chained invocation
-
setActiveWhen
public ModifiableFormItem setActiveWhen(String activeWhen)
Assigns a value to theactiveWhenattribute.- Parameters:
activeWhen- The value for activeWhen, can benull- Returns:
thisfor use in a chained invocation
-
setCanAddRowWhen
public ModifiableFormItem setCanAddRowWhen(String canAddRowWhen)
Assigns a value to thecanAddRowWhenattribute.- Parameters:
canAddRowWhen- The value for canAddRowWhen, can benull- Returns:
thisfor use in a chained invocation
-
setCanRemoveRowWhen
public ModifiableFormItem setCanRemoveRowWhen(String canRemoveRowWhen)
Assigns a value to thecanRemoveRowWhenattribute.- Parameters:
canRemoveRowWhen- The value for canRemoveRowWhen, can benull- Returns:
thisfor use in a chained invocation
-
addValidations
public ModifiableFormItem addValidations(Validation element)
Adds one element tovalidationslist.- Parameters:
element- The validations element- Returns:
thisfor use in a chained invocation
-
addValidations
public final ModifiableFormItem addValidations(Validation... elements)
Adds elements tovalidationslist.- Parameters:
elements- An array of validations elements- Returns:
thisfor use in a chained invocation
-
setValidations
public ModifiableFormItem setValidations(Iterable<? extends Validation> elements)
Sets or replaces all elements forvalidationslist.- Parameters:
elements- An iterable of validations elements- Returns:
thisfor use in a chained invocation
-
addAllValidations
public ModifiableFormItem addAllValidations(Iterable<? extends Validation> elements)
Adds elements tovalidationslist.- Parameters:
elements- An iterable of validations elements- Returns:
thisfor use in a chained invocation
-
setValueSetId
public ModifiableFormItem setValueSetId(String valueSetId)
Assigns a value to thevalueSetIdattribute.- Parameters:
valueSetId- The value for valueSetId, can benull- Returns:
thisfor use in a chained invocation
-
setDefaultValue
public ModifiableFormItem setDefaultValue(Object defaultValue)
Assigns a value to thedefaultValueattribute.- Parameters:
defaultValue- The value for defaultValue, can benull- Returns:
thisfor use in a chained invocation
-
putProps
public ModifiableFormItem putProps(String key, Object value)
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
public ModifiableFormItem setProps(Map<String,? extends Object> entries)
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
public ModifiableFormItem putAllProps(Map<String,? extends Object> entries)
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
public ModifiableFormItem putAdditionalProperties(String key, Object value)
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
public ModifiableFormItem setAdditionalProperties(Map<String,? extends Object> entries)
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
public ModifiableFormItem putAllAdditionalProperties(Map<String,? extends Object> entries)
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
public final ImmutableFormItem toImmutable()
Converts toImmutableFormItem.- Returns:
- An immutable instance of FormItem
-
equals
public boolean equals(@Nullable Object another)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.
-
-