Class SimpleConfigurationLayer

java.lang.Object
com.mooltiverse.oss.nyx.configuration.SimpleConfigurationLayer
All Implemented Interfaces:
ConfigurationLayer, ConfigurationRoot
Direct Known Subclasses:
Extended, Simple

public class SimpleConfigurationLayer extends Object implements ConfigurationLayer
A simple configuration layer, acting as a value holder for configuration options. This object allows read/write operations.
  • Constructor Details

    • SimpleConfigurationLayer

      public SimpleConfigurationLayer()
      Default constructor.
  • Method Details

    • getBump

      public String getBump()
      Returns the version identifier to bump as it's defined by this configuration.
      Specified by:
      getBump in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setBump

      public void setBump(String bump)
      Sets the value for this option.
      Parameters:
      bump - the value for this option.
    • getChangelog

      public ChangelogConfiguration getChangelog()
      Returns the changelog configuration section.
      Specified by:
      getChangelog in interface ConfigurationRoot
      Returns:
      the changelog configuration section. Never null.
    • setChangelog

      public void setChangelog(ChangelogConfiguration changelog)
      Sets the value for this option.
      Parameters:
      changelog - the value for this option.
    • getCommitMessageConventions

      public CommitMessageConventions getCommitMessageConventions()
      Returns the commit message convention configuration section.
      Specified by:
      getCommitMessageConventions in interface ConfigurationRoot
      Returns:
      the commit message convention configuration section. Never null.
    • setCommitMessageConventions

      public void setCommitMessageConventions(CommitMessageConventions commitMessageConventions)
      Sets the value for this option.
      Parameters:
      commitMessageConventions - the value for this option.
    • getConfigurationFile

      public String getConfigurationFile()
      Returns the path to a custom configuration file as it's defined by this configuration.
      Specified by:
      getConfigurationFile in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setConfigurationFile

      public void setConfigurationFile(String configurationFile)
      Sets the value for this option.
      Parameters:
      configurationFile - the value for this option.
    • getDirectory

      public String getDirectory()
      Returns the directory to use as the working directory as it's defined by this configuration.
      Specified by:
      getDirectory in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
      See Also:
    • setDirectory

      public void setDirectory(String directory)
      Sets the value for this option.
      Parameters:
      directory - the value for this option.
    • getDryRun

      public Boolean getDryRun()
      Returns the value of the dry run flag as it's defined by this configuration.
      Specified by:
      getDryRun in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setDryRun

      public void setDryRun(Boolean dryRun)
      Sets the value for this option.
      Parameters:
      dryRun - the value for this option.
    • getGit

      public GitConfiguration getGit()
      Returns the Git configuration section.
      Specified by:
      getGit in interface ConfigurationRoot
      Returns:
      the Git configuration section. Never null.
    • setGit

      public void setGit(GitConfiguration git)
      Sets the value for this option.
      Parameters:
      git - the value for this option.
    • getInitialVersion

      public String getInitialVersion()
      Returns the initial version defined by this configuration to use when no past version is available in the commit history.
      Specified by:
      getInitialVersion in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setInitialVersion

      public void setInitialVersion(String initialVersion)
      Sets the value for this option.
      Parameters:
      initialVersion - the value for this option.
    • getPreset

      public String getPreset()
      Returns selected preset configuration as it's defined by this configuration.
      Specified by:
      getPreset in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setPreset

      public void setPreset(String preset)
      Sets the value for this option.
      Parameters:
      preset - the value for this option.
    • getReleaseAssets

      public Map<String,Attachment> getReleaseAssets()
      Returns the release assets configuration section.
      Specified by:
      getReleaseAssets in interface ConfigurationRoot
      Returns:
      the release assets configuration section. Never null.
    • setReleaseAssets

      public void setReleaseAssets(Map<String,Attachment> releaseAssets)
      Sets the value for this option.
      Parameters:
      releaseAssets - the value for this option.
    • getReleaseLenient

      public Boolean getReleaseLenient()
      Returns the flag that enables tolerance in reading release names with arbitrary prefixes or extra non critical characters as it's defined by this configuration.
      Specified by:
      getReleaseLenient in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setReleaseLenient

      public void setReleaseLenient(Boolean releaseLenient)
      Sets the value for this option.
      Parameters:
      releaseLenient - the value for this option.
    • getReleasePrefix

      public String getReleasePrefix()
      Returns the prefix to use in release name generation as it's defined by this configuration.
      Specified by:
      getReleasePrefix in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setReleasePrefix

      public void setReleasePrefix(String releasePrefix)
      Sets the value for this option.
      Parameters:
      releasePrefix - the value for this option.
    • getReleaseTypes

      public ReleaseTypes getReleaseTypes()
      Returns the release types configuration section.
      Specified by:
      getReleaseTypes in interface ConfigurationRoot
      Returns:
      the release types configuration section. Never null.
    • setReleaseTypes

      public void setReleaseTypes(ReleaseTypes releaseTypes)
      Sets the value for this option.
      Parameters:
      releaseTypes - the value for this option.
    • getResume

      public Boolean getResume()
      Returns the value of the resume flag as it's defined by this configuration.
      Specified by:
      getResume in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setResume

      public void setResume(Boolean resume)
      Sets the value for this option.
      Parameters:
      resume - the value for this option.
    • getScheme

      public Scheme getScheme()
      Returns the versioning scheme to use as it's defined by this configuration.
      Specified by:
      getScheme in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setScheme

      public void setScheme(Scheme scheme)
      Sets the value for this option.
      Parameters:
      scheme - the value for this option.
    • getServices

      public Map<String,ServiceConfiguration> getServices()
      Returns the services configuration section.
      Specified by:
      getServices in interface ConfigurationRoot
      Returns:
      the services configuration section. Never null.
    • setServices

      public void setServices(Map<String,ServiceConfiguration> services)
      Sets the value for this option.
      Parameters:
      services - the value for this option.
    • getSharedConfigurationFile

      public String getSharedConfigurationFile()
      Returns the path to a custom shared configuration file as it's defined by this configuration.
      Specified by:
      getSharedConfigurationFile in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setSharedConfigurationFile

      public void setSharedConfigurationFile(String sharedConfigurationFile)
      Sets the value for this option.
      Parameters:
      sharedConfigurationFile - the value for this option.
    • getStateFile

      public String getStateFile()
      Returns the path to the file where the Nyx State must be saved as it's defined by this configuration.
      Specified by:
      getStateFile in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setStateFile

      public void setStateFile(String stateFile)
      Sets the value for this option.
      Parameters:
      stateFile - the value for this option.
    • getSubstitutions

      public Substitutions getSubstitutions()
      Returns the substitutions configuration section.
      Specified by:
      getSubstitutions in interface ConfigurationRoot
      Returns:
      the substitutions configuration section. Never null.
    • setSubstitutions

      public void setSubstitutions(Substitutions substitutions)
      Sets the value for this option.
      Parameters:
      substitutions - the value for this option.
    • getSummary

      public Boolean getSummary()
      Returns the value of the summary flag as it's defined by this configuration.
      Specified by:
      getSummary in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setSummary

      public void setSummary(Boolean summary)
      Sets the value for this option.
      Parameters:
      summary - the value for this option.
    • getSummaryFile

      public String getSummaryFile()
      Returns the path to the file where the Nyx summary must be saved as it's defined by this configuration.
      Specified by:
      getSummaryFile in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setSummaryFile

      public void setSummaryFile(String summaryFile)
      Sets the value for this option.
      Parameters:
      summaryFile - the value for this option.
    • getVerbosity

      public Verbosity getVerbosity()
      Returns the logging verbosity level as it's defined by this configuration. Please note that the verbosity option is actually ignored in this library implementation as the event filtering based on the verbosity needs to be configured outside this library, depending on the logging framework deployed along with SLF4J. See here for more.
      Specified by:
      getVerbosity in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setVerbosity

      public void setVerbosity(Verbosity verbosity)
      Sets the value for this option.
      Parameters:
      verbosity - the value for this option.
    • getVersion

      public String getVersion()
      Returns the version defined by this configuration.
      Specified by:
      getVersion in interface ConfigurationRoot
      Returns:
      the configured value for this option or null if the value hasn't been defined.
    • setVersion

      public void setVersion(String version)
      Sets the value for this option.
      Parameters:
      version - the value for this option.