Class Model

java.lang.Object
org.owasp.dependencycheck.xml.pom.Model
All Implemented Interfaces:
Serializable

@ThreadSafe public class Model extends Object implements Serializable
A simple pojo to hold data related to a Maven POM file.
Author:
jeremy long
See Also:
  • Constructor Details

    • Model

      public Model()
  • Method Details

    • getName

      public String getName()
      Get the value of name.
      Returns:
      the value of name
    • setName

      public void setName(String name)
      Set the value of name.
      Parameters:
      name - new value of name
    • getOrganization

      public String getOrganization()
      Get the value of organization.
      Returns:
      the value of organization
    • setOrganization

      public void setOrganization(String organization)
      Set the value of organization.
      Parameters:
      organization - new value of organization
    • getOrganizationUrl

      public String getOrganizationUrl()
      Get the value of organizationUrl.
      Returns:
      the value of organizationUrl
    • setOrganizationUrl

      public void setOrganizationUrl(String organizationUrl)
      Set the value of organizationUrl.
      Parameters:
      organizationUrl - new value of organizationUrl
    • getDescription

      public String getDescription()
      Get the value of description.
      Returns:
      the value of description
    • setDescription

      public void setDescription(String description)
      Set the value of description.
      Parameters:
      description - new value of description
    • getGroupId

      public String getGroupId()
      Get the value of groupId.
      Returns:
      the value of groupId
    • setGroupId

      public void setGroupId(String groupId)
      Set the value of groupId.
      Parameters:
      groupId - new value of groupId
    • getArtifactId

      public String getArtifactId()
      Get the value of artifactId.
      Returns:
      the value of artifactId
    • setArtifactId

      public void setArtifactId(String artifactId)
      Set the value of artifactId.
      Parameters:
      artifactId - new value of artifactId
    • getVersion

      public String getVersion()
      Get the value of version.
      Returns:
      the value of version
    • setVersion

      public void setVersion(String version)
      Set the value of version.
      Parameters:
      version - new value of version
    • getParentGroupId

      public String getParentGroupId()
      Get the value of parentGroupId.
      Returns:
      the value of parentGroupId
    • setParentGroupId

      public void setParentGroupId(String parentGroupId)
      Set the value of parentGroupId.
      Parameters:
      parentGroupId - new value of parentGroupId
    • getParentArtifactId

      public String getParentArtifactId()
      Get the value of parentArtifactId.
      Returns:
      the value of parentArtifactId
    • setParentArtifactId

      public void setParentArtifactId(String parentArtifactId)
      Set the value of parentArtifactId.
      Parameters:
      parentArtifactId - new value of parentArtifactId
    • getParentVersion

      public String getParentVersion()
      Get the value of parentVersion.
      Returns:
      the value of parentVersion
    • setParentVersion

      public void setParentVersion(String parentVersion)
      Set the value of parentVersion.
      Parameters:
      parentVersion - new value of parentVersion
    • getLicenses

      public List<License> getLicenses()
      Returns the list of licenses.
      Returns:
      the list of licenses
    • addLicense

      public void addLicense(License license)
      Adds a new license to the list of licenses.
      Parameters:
      license - the license to add
    • getDevelopers

      public List<Developer> getDevelopers()
      Returns the list of developers.
      Returns:
      the list of developers
    • addDeveloper

      public void addDeveloper(Developer developer)
      Adds a new developer to the list of developers.
      Parameters:
      developer - the developer to add
    • getProjectURL

      public String getProjectURL()
      Get the value of projectURL.
      Returns:
      the value of projectURL
    • setProjectURL

      public void setProjectURL(String projectURL)
      Set the value of projectURL.
      Parameters:
      projectURL - new value of projectURL
    • processProperties

      public void processProperties(Properties properties)
      Process the Maven properties file and interpolate all properties.
      Parameters:
      properties - new value of properties
    • setGAVFromPomDotProperties

      public void setGAVFromPomDotProperties(Properties pomProperties)
      Replaces the group/artifact/version obtained from the `pom.xml` which may contain variable references with the interpolated values of the pom.properties content (when present). Validates that at least the documented properties for the G/A/V coordinates are all present. If not it will leave the model unmodified as the property-source was apparently not a valid pom.properties file for the `pom.xml`.
      Parameters:
      pomProperties - A properties object that holds the properties from a pom.properties file.