Class Model
- java.lang.Object
-
- org.owasp.dependencycheck.xml.pom.Model
-
- All Implemented Interfaces:
java.io.Serializable
@ThreadSafe public class Model extends java.lang.Object implements java.io.Serializable
A simple pojo to hold data related to a Maven POM file.- Author:
- jeremy long
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Model()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDeveloper(Developer developer)
Adds a new developer to the list of developers.void
addLicense(License license)
Adds a new license to the list of licenses.java.lang.String
getArtifactId()
Get the value of artifactId.java.lang.String
getDescription()
Get the value of description.java.util.List<Developer>
getDevelopers()
Returns the list of developers.java.lang.String
getGroupId()
Get the value of groupId.java.util.List<License>
getLicenses()
Returns the list of licenses.java.lang.String
getName()
Get the value of name.java.lang.String
getOrganization()
Get the value of organization.java.lang.String
getOrganizationUrl()
Get the value of organizationUrl.java.lang.String
getParentArtifactId()
Get the value of parentArtifactId.java.lang.String
getParentGroupId()
Get the value of parentGroupId.java.lang.String
getParentVersion()
Get the value of parentVersion.java.lang.String
getProjectURL()
Get the value of projectURL.java.lang.String
getVersion()
Get the value of version.void
processProperties(java.util.Properties properties)
Process the Maven properties file and interpolate all properties.void
setArtifactId(java.lang.String artifactId)
Set the value of artifactId.void
setDescription(java.lang.String description)
Set the value of description.void
setGAVFromPomDotProperties(java.util.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).void
setGroupId(java.lang.String groupId)
Set the value of groupId.void
setName(java.lang.String name)
Set the value of name.void
setOrganization(java.lang.String organization)
Set the value of organization.void
setOrganizationUrl(java.lang.String organizationUrl)
Set the value of organizationUrl.void
setParentArtifactId(java.lang.String parentArtifactId)
Set the value of parentArtifactId.void
setParentGroupId(java.lang.String parentGroupId)
Set the value of parentGroupId.void
setParentVersion(java.lang.String parentVersion)
Set the value of parentVersion.void
setProjectURL(java.lang.String projectURL)
Set the value of projectURL.void
setVersion(java.lang.String version)
Set the value of version.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the value of name.- Returns:
- the value of name
-
setName
public void setName(java.lang.String name)
Set the value of name.- Parameters:
name
- new value of name
-
getOrganization
public java.lang.String getOrganization()
Get the value of organization.- Returns:
- the value of organization
-
setOrganization
public void setOrganization(java.lang.String organization)
Set the value of organization.- Parameters:
organization
- new value of organization
-
getOrganizationUrl
public java.lang.String getOrganizationUrl()
Get the value of organizationUrl.- Returns:
- the value of organizationUrl
-
setOrganizationUrl
public void setOrganizationUrl(java.lang.String organizationUrl)
Set the value of organizationUrl.- Parameters:
organizationUrl
- new value of organizationUrl
-
getDescription
public java.lang.String getDescription()
Get the value of description.- Returns:
- the value of description
-
setDescription
public void setDescription(java.lang.String description)
Set the value of description.- Parameters:
description
- new value of description
-
getGroupId
public java.lang.String getGroupId()
Get the value of groupId.- Returns:
- the value of groupId
-
setGroupId
public void setGroupId(java.lang.String groupId)
Set the value of groupId.- Parameters:
groupId
- new value of groupId
-
getArtifactId
public java.lang.String getArtifactId()
Get the value of artifactId.- Returns:
- the value of artifactId
-
setArtifactId
public void setArtifactId(java.lang.String artifactId)
Set the value of artifactId.- Parameters:
artifactId
- new value of artifactId
-
getVersion
public java.lang.String getVersion()
Get the value of version.- Returns:
- the value of version
-
setVersion
public void setVersion(java.lang.String version)
Set the value of version.- Parameters:
version
- new value of version
-
getParentGroupId
public java.lang.String getParentGroupId()
Get the value of parentGroupId.- Returns:
- the value of parentGroupId
-
setParentGroupId
public void setParentGroupId(java.lang.String parentGroupId)
Set the value of parentGroupId.- Parameters:
parentGroupId
- new value of parentGroupId
-
getParentArtifactId
public java.lang.String getParentArtifactId()
Get the value of parentArtifactId.- Returns:
- the value of parentArtifactId
-
setParentArtifactId
public void setParentArtifactId(java.lang.String parentArtifactId)
Set the value of parentArtifactId.- Parameters:
parentArtifactId
- new value of parentArtifactId
-
getParentVersion
public java.lang.String getParentVersion()
Get the value of parentVersion.- Returns:
- the value of parentVersion
-
setParentVersion
public void setParentVersion(java.lang.String parentVersion)
Set the value of parentVersion.- Parameters:
parentVersion
- new value of parentVersion
-
getLicenses
public java.util.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 java.util.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 java.lang.String getProjectURL()
Get the value of projectURL.- Returns:
- the value of projectURL
-
setProjectURL
public void setProjectURL(java.lang.String projectURL)
Set the value of projectURL.- Parameters:
projectURL
- new value of projectURL
-
processProperties
public void processProperties(java.util.Properties properties)
Process the Maven properties file and interpolate all properties.- Parameters:
properties
- new value of properties
-
setGAVFromPomDotProperties
public void setGAVFromPomDotProperties(java.util.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.
-
-