Package io.dialob.api.form
Class ImmutableFormMetadata.Builder
java.lang.Object
io.dialob.api.form.ImmutableFormMetadata.Builder
- Enclosing class:
- ImmutableFormMetadata
Builds instances of type
ImmutableFormMetadata.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllLabels(Iterable<String> elements) Adds elements tolabelsset.addAllLanguages(Iterable<String> elements) Adds elements tolanguagesset.additionalProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap.Adds one element tolabelsset.Adds elements tolabelsset.addLanguages(String element) Adds one element tolanguagesset.addLanguages(String... elements) Adds elements tolanguagesset.build()Builds a newImmutableFormMetadata.Initializes the value for thecreatedattribute.Initializes the value for thecreatorattribute.defaultSubmitUrl(String defaultSubmitUrl) Initializes the value for thedefaultSubmitUrlattribute.from(Form.Metadata instance) Fill a builder with attribute values from the providedMetadatainstance.from(ModifiableFormMetadata instance) Fill a builder with attribute values from the providedModifiableFormMetadatainstance.Initializes the value for thelabelattribute.Sets or replaces all elements forlabelsset.Sets or replaces all elements forlanguagesset.Initializes the value for thelastSavedattribute.putAdditionalProperties(String key, Object value) Put one entry to theadditionalPropertiesmap.putAdditionalProperties(Map.Entry<String, ? extends Object> entry) Put one entry to theadditionalPropertiesmap.putAllAdditionalProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toadditionalPropertiesmap.Initializes the value for thesavedByattribute.Initializes the value for thetenantIdattribute.Initializes the value for thevalidattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedModifiableFormMetadatainstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedMetadatainstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
label
Initializes the value for thelabelattribute.- Parameters:
label- The value for label (can benull)- Returns:
thisbuilder for use in a chained invocation
-
created
Initializes the value for thecreatedattribute.- Parameters:
created- The value for created (can benull)- Returns:
thisbuilder for use in a chained invocation
-
lastSaved
Initializes the value for thelastSavedattribute.- Parameters:
lastSaved- The value for lastSaved (can benull)- Returns:
thisbuilder for use in a chained invocation
-
valid
Initializes the value for thevalidattribute.- Parameters:
valid- The value for valid (can benull)- Returns:
thisbuilder for use in a chained invocation
-
creator
Initializes the value for thecreatorattribute.- Parameters:
creator- The value for creator (can benull)- Returns:
thisbuilder for use in a chained invocation
-
tenantId
Initializes the value for thetenantIdattribute.- Parameters:
tenantId- The value for tenantId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
savedBy
Initializes the value for thesavedByattribute.- Parameters:
savedBy- The value for savedBy (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addLabels
Adds one element tolabelsset.- Parameters:
element- A labels element- Returns:
thisbuilder for use in a chained invocation
-
addLabels
Adds elements tolabelsset.- Parameters:
elements- An array of labels elements- Returns:
thisbuilder for use in a chained invocation
-
labels
Sets or replaces all elements forlabelsset.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLabels
Adds elements tolabelsset.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
defaultSubmitUrl
Initializes the value for thedefaultSubmitUrlattribute.- Parameters:
defaultSubmitUrl- The value for defaultSubmitUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addLanguages
Adds one element tolanguagesset.- Parameters:
element- A languages element- Returns:
thisbuilder for use in a chained invocation
-
addLanguages
Adds elements tolanguagesset.- Parameters:
elements- An array of languages elements- Returns:
thisbuilder for use in a chained invocation
-
languages
Sets or replaces all elements forlanguagesset.- Parameters:
elements- An iterable of languages elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLanguages
Adds elements tolanguagesset.- Parameters:
elements- An iterable of languages elements- Returns:
thisbuilder for use in a chained invocation
-
putAdditionalProperties
public final ImmutableFormMetadata.Builder putAdditionalProperties(@Nullable String key, @Nullable Object value) Put one entry to theadditionalPropertiesmap.- Parameters:
key- The key in the additionalProperties mapvalue- The associated value in the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAdditionalProperties
public final ImmutableFormMetadata.Builder putAdditionalProperties(Map.Entry<String, ? extends Object> entry) Put one entry to theadditionalPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
additionalProperties
public final ImmutableFormMetadata.Builder additionalProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAllAdditionalProperties
public final ImmutableFormMetadata.Builder putAllAdditionalProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toadditionalPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFormMetadata.- Returns:
- An immutable instance of Metadata
- Throws:
IllegalStateException- if any required attributes are missing
-