Class MinConfiguration.Builder

java.lang.Object
com.io7m.minisite.core.MinConfiguration.Builder
Enclosing class:
MinConfiguration

public static final class MinConfiguration.Builder extends Object
Builds instances of type MinConfiguration. 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 Details

    • from

      public final MinConfiguration.Builder from(MinConfigurationType instance)
      Fill a builder with attribute values from the provided MinConfigurationType 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
    • setProjectName

      public final MinConfiguration.Builder setProjectName(String projectName)
      Initializes the value for the projectName attribute.
      Parameters:
      projectName - The value for projectName
      Returns:
      this builder for use in a chained invocation
    • setProjectGroupName

      public final MinConfiguration.Builder setProjectGroupName(String projectGroupName)
      Initializes the value for the projectGroupName attribute.
      Parameters:
      projectGroupName - The value for projectGroupName
      Returns:
      this builder for use in a chained invocation
    • addProjectModules

      public final MinConfiguration.Builder addProjectModules(String element)
      Adds one element to projectModules list.
      Parameters:
      element - A projectModules element
      Returns:
      this builder for use in a chained invocation
    • addProjectModules

      public final MinConfiguration.Builder addProjectModules(String... elements)
      Adds elements to projectModules list.
      Parameters:
      elements - An array of projectModules elements
      Returns:
      this builder for use in a chained invocation
    • setProjectModules

      public final MinConfiguration.Builder setProjectModules(Iterable<String> elements)
      Sets or replaces all elements for projectModules list.
      Parameters:
      elements - An iterable of projectModules elements
      Returns:
      this builder for use in a chained invocation
    • addAllProjectModules

      public final MinConfiguration.Builder addAllProjectModules(Iterable<String> elements)
      Adds elements to projectModules list.
      Parameters:
      elements - An iterable of projectModules elements
      Returns:
      this builder for use in a chained invocation
    • setRelease

      public final MinConfiguration.Builder setRelease(String release)
      Initializes the value for the release attribute.
      Parameters:
      release - The value for release
      Returns:
      this builder for use in a chained invocation
    • setCentralReposPath

      public final MinConfiguration.Builder setCentralReposPath(String centralReposPath)
      Initializes the value for the centralReposPath attribute.
      Parameters:
      centralReposPath - The value for centralReposPath
      Returns:
      this builder for use in a chained invocation
    • setHeader

      public final MinConfiguration.Builder setHeader(Path header)
      Initializes the optional value header to header.
      Parameters:
      header - The value for header
      Returns:
      this builder for chained invocation
    • setHeader

      public final MinConfiguration.Builder setHeader(Optional<? extends Path> header)
      Initializes the optional value header to header.
      Parameters:
      header - The value for header
      Returns:
      this builder for use in a chained invocation
    • setOverview

      public final MinConfiguration.Builder setOverview(Path overview)
      Initializes the optional value overview to overview.
      Parameters:
      overview - The value for overview
      Returns:
      this builder for chained invocation
    • setOverview

      public final MinConfiguration.Builder setOverview(Optional<? extends Path> overview)
      Initializes the optional value overview to overview.
      Parameters:
      overview - The value for overview
      Returns:
      this builder for use in a chained invocation
    • setFeatures

      public final MinConfiguration.Builder setFeatures(Path features)
      Initializes the optional value features to features.
      Parameters:
      features - The value for features
      Returns:
      this builder for chained invocation
    • setFeatures

      public final MinConfiguration.Builder setFeatures(Optional<? extends Path> features)
      Initializes the optional value features to features.
      Parameters:
      features - The value for features
      Returns:
      this builder for use in a chained invocation
    • setDocumentation

      public final MinConfiguration.Builder setDocumentation(Path documentation)
      Initializes the optional value documentation to documentation.
      Parameters:
      documentation - The value for documentation
      Returns:
      this builder for chained invocation
    • setDocumentation

      public final MinConfiguration.Builder setDocumentation(Optional<? extends Path> documentation)
      Initializes the optional value documentation to documentation.
      Parameters:
      documentation - The value for documentation
      Returns:
      this builder for use in a chained invocation
    • setChangelog

      public final MinConfiguration.Builder setChangelog(MinChangesConfiguration changelog)
      Initializes the optional value changelog to changelog.
      Parameters:
      changelog - The value for changelog
      Returns:
      this builder for chained invocation
    • setChangelog

      public final MinConfiguration.Builder setChangelog(Optional<? extends MinChangesConfiguration> changelog)
      Initializes the optional value changelog to changelog.
      Parameters:
      changelog - The value for changelog
      Returns:
      this builder for use in a chained invocation
    • setLicense

      public final MinConfiguration.Builder setLicense(Path license)
      Initializes the optional value license to license.
      Parameters:
      license - The value for license
      Returns:
      this builder for chained invocation
    • setLicense

      public final MinConfiguration.Builder setLicense(Optional<? extends Path> license)
      Initializes the optional value license to license.
      Parameters:
      license - The value for license
      Returns:
      this builder for use in a chained invocation
    • setBugTracker

      public final MinConfiguration.Builder setBugTracker(MinBugTrackerConfiguration bugTracker)
      Initializes the optional value bugTracker to bugTracker.
      Parameters:
      bugTracker - The value for bugTracker
      Returns:
      this builder for chained invocation
    • setBugTracker

      public final MinConfiguration.Builder setBugTracker(Optional<? extends MinBugTrackerConfiguration> bugTracker)
      Initializes the optional value bugTracker to bugTracker.
      Parameters:
      bugTracker - The value for bugTracker
      Returns:
      this builder for use in a chained invocation
    • setSources

      public final MinConfiguration.Builder setSources(MinSourcesConfiguration sources)
      Initializes the optional value sources to sources.
      Parameters:
      sources - The value for sources
      Returns:
      this builder for chained invocation
    • setSources

      public final MinConfiguration.Builder setSources(Optional<? extends MinSourcesConfiguration> sources)
      Initializes the optional value sources to sources.
      Parameters:
      sources - The value for sources
      Returns:
      this builder for use in a chained invocation
    • addCssIncludes

      public final MinConfiguration.Builder addCssIncludes(String element)
      Adds one element to cssIncludes list.
      Parameters:
      element - A cssIncludes element
      Returns:
      this builder for use in a chained invocation
    • addCssIncludes

      public final MinConfiguration.Builder addCssIncludes(String... elements)
      Adds elements to cssIncludes list.
      Parameters:
      elements - An array of cssIncludes elements
      Returns:
      this builder for use in a chained invocation
    • setCssIncludes

      public final MinConfiguration.Builder setCssIncludes(Iterable<String> elements)
      Sets or replaces all elements for cssIncludes list.
      Parameters:
      elements - An iterable of cssIncludes elements
      Returns:
      this builder for use in a chained invocation
    • addAllCssIncludes

      public final MinConfiguration.Builder addAllCssIncludes(Iterable<String> elements)
      Adds elements to cssIncludes list.
      Parameters:
      elements - An iterable of cssIncludes elements
      Returns:
      this builder for use in a chained invocation
    • setCssGenerateStyle

      public final MinConfiguration.Builder setCssGenerateStyle(boolean cssGenerateStyle)
      Initializes the value for the cssGenerateStyle attribute.

      If not set, this attribute will have a default value as returned by the initializer of cssGenerateStyle.

      Parameters:
      cssGenerateStyle - The value for cssGenerateStyle
      Returns:
      this builder for use in a chained invocation
    • build

      public MinConfiguration build()
      Builds a new MinConfiguration.
      Returns:
      An immutable instance of MinConfiguration
      Throws:
      IllegalStateException - if any required attributes are missing