Class ImmutableFormMetadata.Builder

  • Enclosing class:
    ImmutableFormMetadata

    @NotThreadSafe
    public static final class ImmutableFormMetadata.Builder
    extends Object
    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 Detail

      • from

        public final ImmutableFormMetadata.Builder from​(ModifiableFormMetadata instance)
        Fill a builder with attribute values from the provided ModifiableFormMetadata instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final ImmutableFormMetadata.Builder from​(Form.Metadata instance)
        Fill a builder with attribute values from the provided Metadata instance. 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:
        this builder for use in a chained invocation
      • label

        public final ImmutableFormMetadata.Builder label​(String label)
        Initializes the value for the label attribute.
        Parameters:
        label - The value for label (can be null)
        Returns:
        this builder for use in a chained invocation
      • created

        public final ImmutableFormMetadata.Builder created​(Date created)
        Initializes the value for the created attribute.
        Parameters:
        created - The value for created (can be null)
        Returns:
        this builder for use in a chained invocation
      • lastSaved

        public final ImmutableFormMetadata.Builder lastSaved​(Date lastSaved)
        Initializes the value for the lastSaved attribute.
        Parameters:
        lastSaved - The value for lastSaved (can be null)
        Returns:
        this builder for use in a chained invocation
      • valid

        public final ImmutableFormMetadata.Builder valid​(Boolean valid)
        Initializes the value for the valid attribute.
        Parameters:
        valid - The value for valid (can be null)
        Returns:
        this builder for use in a chained invocation
      • creator

        public final ImmutableFormMetadata.Builder creator​(String creator)
        Initializes the value for the creator attribute.
        Parameters:
        creator - The value for creator (can be null)
        Returns:
        this builder for use in a chained invocation
      • tenantId

        public final ImmutableFormMetadata.Builder tenantId​(String tenantId)
        Initializes the value for the tenantId attribute.
        Parameters:
        tenantId - The value for tenantId (can be null)
        Returns:
        this builder for use in a chained invocation
      • savedBy

        public final ImmutableFormMetadata.Builder savedBy​(String savedBy)
        Initializes the value for the savedBy attribute.
        Parameters:
        savedBy - The value for savedBy (can be null)
        Returns:
        this builder for use in a chained invocation
      • addLabels

        public final ImmutableFormMetadata.Builder addLabels​(@Nullable
                                                             String element)
        Adds one element to labels set.
        Parameters:
        element - A labels element
        Returns:
        this builder for use in a chained invocation
      • addLabels

        public final ImmutableFormMetadata.Builder addLabels​(String... elements)
        Adds elements to labels set.
        Parameters:
        elements - An array of labels elements
        Returns:
        this builder for use in a chained invocation
      • labels

        public final ImmutableFormMetadata.Builder labels​(Iterable<String> elements)
        Sets or replaces all elements for labels set.
        Parameters:
        elements - An iterable of labels elements
        Returns:
        this builder for use in a chained invocation
      • defaultSubmitUrl

        public final ImmutableFormMetadata.Builder defaultSubmitUrl​(String defaultSubmitUrl)
        Initializes the value for the defaultSubmitUrl attribute.
        Parameters:
        defaultSubmitUrl - The value for defaultSubmitUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • addLanguages

        public final ImmutableFormMetadata.Builder addLanguages​(@Nullable
                                                                String element)
        Adds one element to languages set.
        Parameters:
        element - A languages element
        Returns:
        this builder for use in a chained invocation
      • addLanguages

        public final ImmutableFormMetadata.Builder addLanguages​(String... elements)
        Adds elements to languages set.
        Parameters:
        elements - An array of languages elements
        Returns:
        this builder for use in a chained invocation
      • putAdditionalProperties

        public final ImmutableFormMetadata.Builder putAdditionalProperties​(@Nullable
                                                                           String key,
                                                                           @Nullable
                                                                           Object value)
        Put one entry to the additionalProperties map.
        Parameters:
        key - The key in the additionalProperties map
        value - The associated value in the additionalProperties map
        Returns:
        this builder 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 the additionalProperties map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the additionalProperties map
        Returns:
        this builder 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 to additionalProperties map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the additionalProperties map
        Returns:
        this builder for use in a chained invocation