Class Model
java.lang.Object
org.owasp.dependencycheck.xml.pom.Model
- All Implemented Interfaces:
Serializable
A simple pojo to hold data related to a Maven POM file.
- Author:
- jeremy long
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeveloper(Developer developer) Adds a new developer to the list of developers.voidaddLicense(License license) Adds a new license to the list of licenses.Get the value of artifactId.Get the value of description.Returns the list of developers.Get the value of groupId.Returns the list of licenses.getName()Get the value of name.Get the value of organization.Get the value of organizationUrl.Get the value of parentArtifactId.Get the value of parentGroupId.Get the value of parentVersion.Get the value of projectURL.Get the value of version.voidprocessProperties(Properties properties) Process the Maven properties file and interpolate all properties.voidsetArtifactId(String artifactId) Set the value of artifactId.voidsetDescription(String description) Set the value of description.voidsetGAVFromPomDotProperties(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).voidsetGroupId(String groupId) Set the value of groupId.voidSet the value of name.voidsetOrganization(String organization) Set the value of organization.voidsetOrganizationUrl(String organizationUrl) Set the value of organizationUrl.voidsetParentArtifactId(String parentArtifactId) Set the value of parentArtifactId.voidsetParentGroupId(String parentGroupId) Set the value of parentGroupId.voidsetParentVersion(String parentVersion) Set the value of parentVersion.voidsetProjectURL(String projectURL) Set the value of projectURL.voidsetVersion(String version) Set the value of version.
-
Constructor Details
-
Model
public Model()
-
-
Method Details
-
getName
-
setName
-
getOrganization
-
setOrganization
Set the value of organization.- Parameters:
organization- new value of organization
-
getOrganizationUrl
Get the value of organizationUrl.- Returns:
- the value of organizationUrl
-
setOrganizationUrl
Set the value of organizationUrl.- Parameters:
organizationUrl- new value of organizationUrl
-
getDescription
-
setDescription
Set the value of description.- Parameters:
description- new value of description
-
getGroupId
-
setGroupId
Set the value of groupId.- Parameters:
groupId- new value of groupId
-
getArtifactId
-
setArtifactId
Set the value of artifactId.- Parameters:
artifactId- new value of artifactId
-
getVersion
-
setVersion
Set the value of version.- Parameters:
version- new value of version
-
getParentGroupId
Get the value of parentGroupId.- Returns:
- the value of parentGroupId
-
setParentGroupId
Set the value of parentGroupId.- Parameters:
parentGroupId- new value of parentGroupId
-
getParentArtifactId
Get the value of parentArtifactId.- Returns:
- the value of parentArtifactId
-
setParentArtifactId
Set the value of parentArtifactId.- Parameters:
parentArtifactId- new value of parentArtifactId
-
getParentVersion
Get the value of parentVersion.- Returns:
- the value of parentVersion
-
setParentVersion
Set the value of parentVersion.- Parameters:
parentVersion- new value of parentVersion
-
getLicenses
-
addLicense
Adds a new license to the list of licenses.- Parameters:
license- the license to add
-
getDevelopers
-
addDeveloper
Adds a new developer to the list of developers.- Parameters:
developer- the developer to add
-
getProjectURL
-
setProjectURL
Set the value of projectURL.- Parameters:
projectURL- new value of projectURL
-
processProperties
Process the Maven properties file and interpolate all properties.- Parameters:
properties- new value of properties
-
setGAVFromPomDotProperties
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.
-