Package com.io7m.minisite.core
Class MinConfiguration.Builder
java.lang.Object
com.io7m.minisite.core.MinConfiguration.Builder
- Enclosing class:
- MinConfiguration
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 Summary
Modifier and TypeMethodDescriptionfinal MinConfiguration.BuilderaddAllCssIncludes(Iterable<String> elements) Adds elements tocssIncludeslist.final MinConfiguration.BuilderaddAllProjectModules(Iterable<String> elements) Adds elements toprojectModuleslist.final MinConfiguration.BuilderaddCssIncludes(String element) Adds one element tocssIncludeslist.final MinConfiguration.BuilderaddCssIncludes(String... elements) Adds elements tocssIncludeslist.final MinConfiguration.BuilderaddProjectModules(String element) Adds one element toprojectModuleslist.final MinConfiguration.BuilderaddProjectModules(String... elements) Adds elements toprojectModuleslist.build()Builds a newMinConfiguration.final MinConfiguration.Builderfrom(MinConfigurationType instance) Fill a builder with attribute values from the providedMinConfigurationTypeinstance.final MinConfiguration.BuildersetBugTracker(MinBugTrackerConfiguration bugTracker) Initializes the optional valuebugTrackerto bugTracker.final MinConfiguration.BuildersetBugTracker(Optional<? extends MinBugTrackerConfiguration> bugTracker) Initializes the optional valuebugTrackerto bugTracker.final MinConfiguration.BuildersetCentralReposPath(String centralReposPath) Initializes the value for thecentralReposPathattribute.final MinConfiguration.BuildersetChangelog(MinChangesConfiguration changelog) Initializes the optional valuechangelogto changelog.final MinConfiguration.BuildersetChangelog(Optional<? extends MinChangesConfiguration> changelog) Initializes the optional valuechangelogto changelog.final MinConfiguration.BuildersetCssGenerateStyle(boolean cssGenerateStyle) Initializes the value for thecssGenerateStyleattribute.final MinConfiguration.BuildersetCssIncludes(Iterable<String> elements) Sets or replaces all elements forcssIncludeslist.final MinConfiguration.BuildersetDocumentation(Path documentation) Initializes the optional valuedocumentationto documentation.final MinConfiguration.BuildersetDocumentation(Optional<? extends Path> documentation) Initializes the optional valuedocumentationto documentation.final MinConfiguration.BuildersetFeatures(Path features) Initializes the optional valuefeaturesto features.final MinConfiguration.BuildersetFeatures(Optional<? extends Path> features) Initializes the optional valuefeaturesto features.final MinConfiguration.BuilderInitializes the optional valueheaderto header.final MinConfiguration.BuilderInitializes the optional valueheaderto header.final MinConfiguration.BuildersetLicense(Path license) Initializes the optional valuelicenseto license.final MinConfiguration.BuildersetLicense(Optional<? extends Path> license) Initializes the optional valuelicenseto license.final MinConfiguration.BuildersetOverview(Path overview) Initializes the optional valueoverviewto overview.final MinConfiguration.BuildersetOverview(Optional<? extends Path> overview) Initializes the optional valueoverviewto overview.final MinConfiguration.BuildersetProjectGroupName(String projectGroupName) Initializes the value for theprojectGroupNameattribute.final MinConfiguration.BuildersetProjectModules(Iterable<String> elements) Sets or replaces all elements forprojectModuleslist.final MinConfiguration.BuildersetProjectName(String projectName) Initializes the value for theprojectNameattribute.final MinConfiguration.BuildersetRelease(String release) Initializes the value for thereleaseattribute.final MinConfiguration.BuildersetSources(MinSourcesConfiguration sources) Initializes the optional valuesourcesto sources.final MinConfiguration.BuildersetSources(Optional<? extends MinSourcesConfiguration> sources) Initializes the optional valuesourcesto sources.
-
Method Details
-
from
Fill a builder with attribute values from the providedMinConfigurationTypeinstance. 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
-
setProjectName
Initializes the value for theprojectNameattribute.- Parameters:
projectName- The value for projectName- Returns:
thisbuilder for use in a chained invocation
-
setProjectGroupName
Initializes the value for theprojectGroupNameattribute.- Parameters:
projectGroupName- The value for projectGroupName- Returns:
thisbuilder for use in a chained invocation
-
addProjectModules
Adds one element toprojectModuleslist.- Parameters:
element- A projectModules element- Returns:
thisbuilder for use in a chained invocation
-
addProjectModules
Adds elements toprojectModuleslist.- Parameters:
elements- An array of projectModules elements- Returns:
thisbuilder for use in a chained invocation
-
setProjectModules
Sets or replaces all elements forprojectModuleslist.- Parameters:
elements- An iterable of projectModules elements- Returns:
thisbuilder for use in a chained invocation
-
addAllProjectModules
Adds elements toprojectModuleslist.- Parameters:
elements- An iterable of projectModules elements- Returns:
thisbuilder for use in a chained invocation
-
setRelease
Initializes the value for thereleaseattribute.- Parameters:
release- The value for release- Returns:
thisbuilder for use in a chained invocation
-
setCentralReposPath
Initializes the value for thecentralReposPathattribute.- Parameters:
centralReposPath- The value for centralReposPath- Returns:
thisbuilder for use in a chained invocation
-
setHeader
Initializes the optional valueheaderto header.- Parameters:
header- The value for header- Returns:
thisbuilder for chained invocation
-
setHeader
Initializes the optional valueheaderto header.- Parameters:
header- The value for header- Returns:
thisbuilder for use in a chained invocation
-
setOverview
Initializes the optional valueoverviewto overview.- Parameters:
overview- The value for overview- Returns:
thisbuilder for chained invocation
-
setOverview
Initializes the optional valueoverviewto overview.- Parameters:
overview- The value for overview- Returns:
thisbuilder for use in a chained invocation
-
setFeatures
Initializes the optional valuefeaturesto features.- Parameters:
features- The value for features- Returns:
thisbuilder for chained invocation
-
setFeatures
Initializes the optional valuefeaturesto features.- Parameters:
features- The value for features- Returns:
thisbuilder for use in a chained invocation
-
setDocumentation
Initializes the optional valuedocumentationto documentation.- Parameters:
documentation- The value for documentation- Returns:
thisbuilder for chained invocation
-
setDocumentation
Initializes the optional valuedocumentationto documentation.- Parameters:
documentation- The value for documentation- Returns:
thisbuilder for use in a chained invocation
-
setChangelog
Initializes the optional valuechangelogto changelog.- Parameters:
changelog- The value for changelog- Returns:
thisbuilder for chained invocation
-
setChangelog
public final MinConfiguration.Builder setChangelog(Optional<? extends MinChangesConfiguration> changelog) Initializes the optional valuechangelogto changelog.- Parameters:
changelog- The value for changelog- Returns:
thisbuilder for use in a chained invocation
-
setLicense
Initializes the optional valuelicenseto license.- Parameters:
license- The value for license- Returns:
thisbuilder for chained invocation
-
setLicense
Initializes the optional valuelicenseto license.- Parameters:
license- The value for license- Returns:
thisbuilder for use in a chained invocation
-
setBugTracker
Initializes the optional valuebugTrackerto bugTracker.- Parameters:
bugTracker- The value for bugTracker- Returns:
thisbuilder for chained invocation
-
setBugTracker
public final MinConfiguration.Builder setBugTracker(Optional<? extends MinBugTrackerConfiguration> bugTracker) Initializes the optional valuebugTrackerto bugTracker.- Parameters:
bugTracker- The value for bugTracker- Returns:
thisbuilder for use in a chained invocation
-
setSources
Initializes the optional valuesourcesto sources.- Parameters:
sources- The value for sources- Returns:
thisbuilder for chained invocation
-
setSources
public final MinConfiguration.Builder setSources(Optional<? extends MinSourcesConfiguration> sources) Initializes the optional valuesourcesto sources.- Parameters:
sources- The value for sources- Returns:
thisbuilder for use in a chained invocation
-
addCssIncludes
Adds one element tocssIncludeslist.- Parameters:
element- A cssIncludes element- Returns:
thisbuilder for use in a chained invocation
-
addCssIncludes
Adds elements tocssIncludeslist.- Parameters:
elements- An array of cssIncludes elements- Returns:
thisbuilder for use in a chained invocation
-
setCssIncludes
Sets or replaces all elements forcssIncludeslist.- Parameters:
elements- An iterable of cssIncludes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllCssIncludes
Adds elements tocssIncludeslist.- Parameters:
elements- An iterable of cssIncludes elements- Returns:
thisbuilder for use in a chained invocation
-
setCssGenerateStyle
Initializes the value for thecssGenerateStyleattribute.If not set, this attribute will have a default value as returned by the initializer of
cssGenerateStyle.- Parameters:
cssGenerateStyle- The value for cssGenerateStyle- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMinConfiguration.- Returns:
- An immutable instance of MinConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-