Class MutableProjectDescription

java.lang.Object
io.spring.initializr.generator.project.MutableProjectDescription
All Implemented Interfaces:
ProjectDescription

public class MutableProjectDescription extends Object implements ProjectDescription
A mutable implementation of ProjectDescription.
Author:
Andy Wilkinson
  • Constructor Details

    • MutableProjectDescription

      public MutableProjectDescription()
      Creates a new instance.
    • MutableProjectDescription

      protected MutableProjectDescription(MutableProjectDescription source)
      Create a new instance with the state of the specified source.
      Parameters:
      source - the source description to initialize this instance with
  • Method Details

    • createCopy

      public MutableProjectDescription createCopy()
      Description copied from interface: ProjectDescription
      Create a full copy of this description so that any additional changes made on this instance are not reflected on the returned copy.
      Specified by:
      createCopy in interface ProjectDescription
      Returns:
      a clone of this instance
    • getPlatformVersion

      public Version getPlatformVersion()
      Description copied from interface: ProjectDescription
      Return the requested platform Version.
      Specified by:
      getPlatformVersion in interface ProjectDescription
      Returns:
      the requested platform version or null
    • setPlatformVersion

      public void setPlatformVersion(Version platformVersion)
      Sets the platform version.
      Parameters:
      platformVersion - the platform version
    • getBuildSystem

      public BuildSystem getBuildSystem()
      Description copied from interface: ProjectDescription
      Return the BuildSystem to use.
      Specified by:
      getBuildSystem in interface ProjectDescription
      Returns:
      the build system or null
    • setBuildSystem

      public void setBuildSystem(BuildSystem buildSystem)
      Sets the build system.
      Parameters:
      buildSystem - the build system
    • getPackaging

      public Packaging getPackaging()
      Description copied from interface: ProjectDescription
      Return the build Packaging to use.
      Specified by:
      getPackaging in interface ProjectDescription
      Returns:
      the build packaging or null
    • setPackaging

      public void setPackaging(Packaging packaging)
      Sets the packaging.
      Parameters:
      packaging - the packaging
    • getLanguage

      public Language getLanguage()
      Description copied from interface: ProjectDescription
      Return the primary Language of the project.
      Specified by:
      getLanguage in interface ProjectDescription
      Returns:
      the primary language or null
    • setConfigurationFileFormat

      public void setConfigurationFileFormat(ConfigurationFileFormat configurationFileFormat)
      Sets the configuration file format.
      Parameters:
      configurationFileFormat - the configuration file format
    • getConfigurationFileFormat

      public ConfigurationFileFormat getConfigurationFileFormat()
      Description copied from interface: ProjectDescription
      Return the ConfigurationFileFormat of the project.
      Specified by:
      getConfigurationFileFormat in interface ProjectDescription
      Returns:
      the configuration file format or null
    • setLanguage

      public void setLanguage(Language language)
      Sets the language.
      Parameters:
      language - the language
    • addDependency

      public Dependency addDependency(String id, Dependency dependency)
      Adds the given dependency.
      Parameters:
      id - the id
      dependency - the dependency
      Returns:
      the added dependency
    • addDependency

      public Dependency addDependency(String id, Dependency.Builder<?> builder)
      Adds the given dependency.
      Parameters:
      id - the id
      builder - the dependency builder
      Returns:
      the added dependency
    • removeDependency

      public Dependency removeDependency(String id)
      Removes the dependency with the given id.
      Parameters:
      id - the id
      Returns:
      the removed dependency
    • getRequestedDependencies

      public Map<String,Dependency> getRequestedDependencies()
      Description copied from interface: ProjectDescription
      Return an immutable mapping of requested dependencies.
      Specified by:
      getRequestedDependencies in interface ProjectDescription
      Returns:
      the requested dependencies
    • getGroupId

      public String getGroupId()
      Description copied from interface: ProjectDescription
      Return the build groupId.
      Specified by:
      getGroupId in interface ProjectDescription
      Returns:
      the groupId or null
    • setGroupId

      public void setGroupId(String groupId)
      Sets the group id.
      Parameters:
      groupId - the group id
    • getArtifactId

      public String getArtifactId()
      Description copied from interface: ProjectDescription
      Return the build artifactId.
      Specified by:
      getArtifactId in interface ProjectDescription
      Returns:
      the artifactId or null
    • setArtifactId

      public void setArtifactId(String artifactId)
      Sets the artifact id.
      Parameters:
      artifactId - the artifact id
    • getVersion

      public String getVersion()
      Description copied from interface: ProjectDescription
      Return the version of the project.
      Specified by:
      getVersion in interface ProjectDescription
      Returns:
      the version of null
    • setVersion

      public void setVersion(String version)
      Sets the version.
      Parameters:
      version - the version
    • getName

      public String getName()
      Description copied from interface: ProjectDescription
      Return a simple name for the project.
      Specified by:
      getName in interface ProjectDescription
      Returns:
      the name of the project or null
    • setName

      public void setName(String name)
      Sets the name.
      Parameters:
      name - the name
    • getDescription

      public String getDescription()
      Description copied from interface: ProjectDescription
      Return a human-readable description of the project.
      Specified by:
      getDescription in interface ProjectDescription
      Returns:
      the description of the project or null
    • setDescription

      public void setDescription(String description)
      Sets the description.
      Parameters:
      description - the description
    • getApplicationName

      public String getApplicationName()
      Description copied from interface: ProjectDescription
      Return the name of the application as a standard Java identifier.
      Specified by:
      getApplicationName in interface ProjectDescription
      Returns:
      the name of the application or null
    • setApplicationName

      public void setApplicationName(String applicationName)
      Sets the application name.
      Parameters:
      applicationName - the application name
    • getPackageName

      public String getPackageName()
      Description copied from interface: ProjectDescription
      Return the root package name of the project.
      Specified by:
      getPackageName in interface ProjectDescription
      Returns:
      the package name or null
    • setPackageName

      public void setPackageName(String packageName)
      Sets the package name.
      Parameters:
      packageName - the package name
    • getBaseDirectory

      public String getBaseDirectory()
      Description copied from interface: ProjectDescription
      Return the base directory of the project or null to use the root directory.
      Specified by:
      getBaseDirectory in interface ProjectDescription
      Returns:
      the base directory
    • setBaseDirectory

      public void setBaseDirectory(String baseDirectory)
      Sets the base directory.
      Parameters:
      baseDirectory - the base directory