Package com.io7m.minisite.core
Class MinConfiguration
java.lang.Object
com.io7m.minisite.core.MinConfiguration
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MinConfiguration.Builderbuilder()Creates a builder forMinConfiguration.static MinConfigurationcopyOf(MinConfigurationType instance) Creates an immutable copy of aMinConfigurationTypevalue.booleanbooleanThis instance is equal to all instances ofMinConfigurationthat have equal attribute values.features()inthashCode()Computes a hash code from attributes:projectName,projectGroupName,projectModules,release,centralReposPath,header,overview,features,documentation,changelog,license,bugTracker,sources,cssIncludes,cssGenerateStyle.header()license()static MinConfigurationof(String projectName, String projectGroupName, Iterable<String> projectModules, String release, String centralReposPath, Optional<? extends Path> header, Optional<? extends Path> overview, Optional<? extends Path> features, Optional<? extends Path> documentation, Optional<? extends MinChangesConfiguration> changelog, Optional<? extends Path> license, Optional<? extends MinBugTrackerConfiguration> bugTracker, Optional<? extends MinSourcesConfiguration> sources, Iterable<String> cssIncludes, boolean cssGenerateStyle) Construct a new immutableMinConfigurationinstance.static MinConfigurationof(String projectName, String projectGroupName, List<String> projectModules, String release, String centralReposPath, Optional<Path> header, Optional<Path> overview, Optional<Path> features, Optional<Path> documentation, Optional<MinChangesConfiguration> changelog, Optional<Path> license, Optional<MinBugTrackerConfiguration> bugTracker, Optional<MinSourcesConfiguration> sources, List<String> cssIncludes, boolean cssGenerateStyle) Construct a new immutableMinConfigurationinstance.overview()release()sources()toString()Prints the immutable valueMinConfigurationwith attribute values.final MinConfigurationCopy the current immutable object by setting a present value for the optionalbugTrackerattribute.final MinConfigurationwithBugTracker(Optional<? extends MinBugTrackerConfiguration> optional) Copy the current immutable object by setting an optional value for thebugTrackerattribute.final MinConfigurationwithCentralReposPath(String value) Copy the current immutable object by setting a value for thecentralReposPathattribute.final MinConfigurationCopy the current immutable object by setting a present value for the optionalchangelogattribute.final MinConfigurationwithChangelog(Optional<? extends MinChangesConfiguration> optional) Copy the current immutable object by setting an optional value for thechangelogattribute.final MinConfigurationwithCssGenerateStyle(boolean value) Copy the current immutable object by setting a value for thecssGenerateStyleattribute.final MinConfigurationwithCssIncludes(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofcssIncludes.final MinConfigurationwithCssIncludes(String... elements) Copy the current immutable object with elements that replace the content ofcssIncludes.final MinConfigurationwithDocumentation(Path value) Copy the current immutable object by setting a present value for the optionaldocumentationattribute.final MinConfigurationwithDocumentation(Optional<? extends Path> optional) Copy the current immutable object by setting an optional value for thedocumentationattribute.final MinConfigurationwithFeatures(Path value) Copy the current immutable object by setting a present value for the optionalfeaturesattribute.final MinConfigurationwithFeatures(Optional<? extends Path> optional) Copy the current immutable object by setting an optional value for thefeaturesattribute.final MinConfigurationwithHeader(Path value) Copy the current immutable object by setting a present value for the optionalheaderattribute.final MinConfigurationwithHeader(Optional<? extends Path> optional) Copy the current immutable object by setting an optional value for theheaderattribute.final MinConfigurationwithLicense(Path value) Copy the current immutable object by setting a present value for the optionallicenseattribute.final MinConfigurationwithLicense(Optional<? extends Path> optional) Copy the current immutable object by setting an optional value for thelicenseattribute.final MinConfigurationwithOverview(Path value) Copy the current immutable object by setting a present value for the optionaloverviewattribute.final MinConfigurationwithOverview(Optional<? extends Path> optional) Copy the current immutable object by setting an optional value for theoverviewattribute.final MinConfigurationwithProjectGroupName(String value) Copy the current immutable object by setting a value for theprojectGroupNameattribute.final MinConfigurationwithProjectModules(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofprojectModules.final MinConfigurationwithProjectModules(String... elements) Copy the current immutable object with elements that replace the content ofprojectModules.final MinConfigurationwithProjectName(String value) Copy the current immutable object by setting a value for theprojectNameattribute.final MinConfigurationwithRelease(String value) Copy the current immutable object by setting a value for thereleaseattribute.final MinConfigurationCopy the current immutable object by setting a present value for the optionalsourcesattribute.final MinConfigurationwithSources(Optional<? extends MinSourcesConfiguration> optional) Copy the current immutable object by setting an optional value for thesourcesattribute.
-
Method Details
-
projectName
- Specified by:
projectNamein interfaceMinConfigurationType- Returns:
- The name of the project
-
projectGroupName
- Specified by:
projectGroupNamein interfaceMinConfigurationType- Returns:
- The group name of the project
-
projectModules
- Specified by:
projectModulesin interfaceMinConfigurationType- Returns:
- The project modules
-
release
- Specified by:
releasein interfaceMinConfigurationType- Returns:
- The version number of the current release
-
centralReposPath
- Specified by:
centralReposPathin interfaceMinConfigurationType- Returns:
- The path to the project within the Central Repository
-
header
- Specified by:
headerin interfaceMinConfigurationType- Returns:
- An XHTML file containing a header inserted above the title and logo in generated sites.
-
overview
- Specified by:
overviewin interfaceMinConfigurationType- Returns:
- An XHTML file containing an overview of the project
-
features
- Specified by:
featuresin interfaceMinConfigurationType- Returns:
- An XHTML file containing the features of the project
-
documentation
- Specified by:
documentationin interfaceMinConfigurationType- Returns:
- An XHTML file containing the documentation links of the project
-
changelog
- Specified by:
changelogin interfaceMinConfigurationType- Returns:
- The changelog configuration, if any
-
license
- Specified by:
licensein interfaceMinConfigurationType- Returns:
- A plain text file containing the project license
-
bugTracker
- Specified by:
bugTrackerin interfaceMinConfigurationType- Returns:
- The bug tracker configuration, if any
-
sources
- Specified by:
sourcesin interfaceMinConfigurationType- Returns:
- The project source configuration, if any
-
cssIncludes
- Specified by:
cssIncludesin interfaceMinConfigurationType- Returns:
- The list of stylesheets that will be included by the generated site
-
cssGenerateStyle
public boolean cssGenerateStyle()- Specified by:
cssGenerateStylein interfaceMinConfigurationType- Returns:
trueif the default style should be copied to the generated site directory
-
withProjectName
Copy the current immutable object by setting a value for theprojectNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for projectName- Returns:
- A modified copy of the
thisobject
-
withProjectGroupName
Copy the current immutable object by setting a value for theprojectGroupNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for projectGroupName- Returns:
- A modified copy of the
thisobject
-
withProjectModules
Copy the current immutable object with elements that replace the content ofprojectModules.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withProjectModules
Copy the current immutable object with elements that replace the content ofprojectModules. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of projectModules elements to set- Returns:
- A modified copy of
thisobject
-
withRelease
Copy the current immutable object by setting a value for thereleaseattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for release- Returns:
- A modified copy of the
thisobject
-
withCentralReposPath
Copy the current immutable object by setting a value for thecentralReposPathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for centralReposPath- Returns:
- A modified copy of the
thisobject
-
withHeader
Copy the current immutable object by setting a present value for the optionalheaderattribute.- Parameters:
value- The value for header- Returns:
- A modified copy of
thisobject
-
withHeader
Copy the current immutable object by setting an optional value for theheaderattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for header- Returns:
- A modified copy of
thisobject
-
withOverview
Copy the current immutable object by setting a present value for the optionaloverviewattribute.- Parameters:
value- The value for overview- Returns:
- A modified copy of
thisobject
-
withOverview
Copy the current immutable object by setting an optional value for theoverviewattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for overview- Returns:
- A modified copy of
thisobject
-
withFeatures
Copy the current immutable object by setting a present value for the optionalfeaturesattribute.- Parameters:
value- The value for features- Returns:
- A modified copy of
thisobject
-
withFeatures
Copy the current immutable object by setting an optional value for thefeaturesattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for features- Returns:
- A modified copy of
thisobject
-
withDocumentation
Copy the current immutable object by setting a present value for the optionaldocumentationattribute.- Parameters:
value- The value for documentation- Returns:
- A modified copy of
thisobject
-
withDocumentation
Copy the current immutable object by setting an optional value for thedocumentationattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for documentation- Returns:
- A modified copy of
thisobject
-
withChangelog
Copy the current immutable object by setting a present value for the optionalchangelogattribute.- Parameters:
value- The value for changelog- Returns:
- A modified copy of
thisobject
-
withChangelog
Copy the current immutable object by setting an optional value for thechangelogattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for changelog- Returns:
- A modified copy of
thisobject
-
withLicense
Copy the current immutable object by setting a present value for the optionallicenseattribute.- Parameters:
value- The value for license- Returns:
- A modified copy of
thisobject
-
withLicense
Copy the current immutable object by setting an optional value for thelicenseattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for license- Returns:
- A modified copy of
thisobject
-
withBugTracker
Copy the current immutable object by setting a present value for the optionalbugTrackerattribute.- Parameters:
value- The value for bugTracker- Returns:
- A modified copy of
thisobject
-
withBugTracker
public final MinConfiguration withBugTracker(Optional<? extends MinBugTrackerConfiguration> optional) Copy the current immutable object by setting an optional value for thebugTrackerattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for bugTracker- Returns:
- A modified copy of
thisobject
-
withSources
Copy the current immutable object by setting a present value for the optionalsourcesattribute.- Parameters:
value- The value for sources- Returns:
- A modified copy of
thisobject
-
withSources
Copy the current immutable object by setting an optional value for thesourcesattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for sources- Returns:
- A modified copy of
thisobject
-
withCssIncludes
Copy the current immutable object with elements that replace the content ofcssIncludes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withCssIncludes
Copy the current immutable object with elements that replace the content ofcssIncludes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of cssIncludes elements to set- Returns:
- A modified copy of
thisobject
-
withCssGenerateStyle
Copy the current immutable object by setting a value for thecssGenerateStyleattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for cssGenerateStyle- Returns:
- A modified copy of the
thisobject
-
equals
-
hashCode
public int hashCode()Computes a hash code from attributes:projectName,projectGroupName,projectModules,release,centralReposPath,header,overview,features,documentation,changelog,license,bugTracker,sources,cssIncludes,cssGenerateStyle. -
toString
-
of
public static MinConfiguration of(String projectName, String projectGroupName, List<String> projectModules, String release, String centralReposPath, Optional<Path> header, Optional<Path> overview, Optional<Path> features, Optional<Path> documentation, Optional<MinChangesConfiguration> changelog, Optional<Path> license, Optional<MinBugTrackerConfiguration> bugTracker, Optional<MinSourcesConfiguration> sources, List<String> cssIncludes, boolean cssGenerateStyle) Construct a new immutableMinConfigurationinstance.- Parameters:
projectName- The value for theprojectNameattributeprojectGroupName- The value for theprojectGroupNameattributeprojectModules- The value for theprojectModulesattributerelease- The value for thereleaseattributecentralReposPath- The value for thecentralReposPathattributeheader- The value for theheaderattributeoverview- The value for theoverviewattributefeatures- The value for thefeaturesattributedocumentation- The value for thedocumentationattributechangelog- The value for thechangelogattributelicense- The value for thelicenseattributebugTracker- The value for thebugTrackerattributesources- The value for thesourcesattributecssIncludes- The value for thecssIncludesattributecssGenerateStyle- The value for thecssGenerateStyleattribute- Returns:
- An immutable MinConfiguration instance
-
of
public static MinConfiguration of(String projectName, String projectGroupName, Iterable<String> projectModules, String release, String centralReposPath, Optional<? extends Path> header, Optional<? extends Path> overview, Optional<? extends Path> features, Optional<? extends Path> documentation, Optional<? extends MinChangesConfiguration> changelog, Optional<? extends Path> license, Optional<? extends MinBugTrackerConfiguration> bugTracker, Optional<? extends MinSourcesConfiguration> sources, Iterable<String> cssIncludes, boolean cssGenerateStyle) Construct a new immutableMinConfigurationinstance.- Parameters:
projectName- The value for theprojectNameattributeprojectGroupName- The value for theprojectGroupNameattributeprojectModules- The value for theprojectModulesattributerelease- The value for thereleaseattributecentralReposPath- The value for thecentralReposPathattributeheader- The value for theheaderattributeoverview- The value for theoverviewattributefeatures- The value for thefeaturesattributedocumentation- The value for thedocumentationattributechangelog- The value for thechangelogattributelicense- The value for thelicenseattributebugTracker- The value for thebugTrackerattributesources- The value for thesourcesattributecssIncludes- The value for thecssIncludesattributecssGenerateStyle- The value for thecssGenerateStyleattribute- Returns:
- An immutable MinConfiguration instance
-
copyOf
Creates an immutable copy of aMinConfigurationTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable MinConfiguration instance
-
builder
Creates a builder forMinConfiguration.MinConfiguration.builder() .setProjectName(String) // requiredprojectName.setProjectGroupName(String) // requiredprojectGroupName.addProjectModules|addAllProjectModules(String) //projectModuleselements .setRelease(String) // requiredrelease.setCentralReposPath(String) // requiredcentralReposPath.setHeader(java.nio.file.Path) // optionalheader.setOverview(java.nio.file.Path) // optionaloverview.setFeatures(java.nio.file.Path) // optionalfeatures.setDocumentation(java.nio.file.Path) // optionaldocumentation.setChangelog(MinChangesConfiguration) // optionalchangelog.setLicense(java.nio.file.Path) // optionallicense.setBugTracker(MinBugTrackerConfiguration) // optionalbugTracker.setSources(MinSourcesConfiguration) // optionalsources.addCssIncludes|addAllCssIncludes(String) //cssIncludeselements .setCssGenerateStyle(boolean) // optionalcssGenerateStyle.build();- Returns:
- A new MinConfiguration builder
-