Class MavenArtifact
- java.lang.Object
-
- org.owasp.dependencycheck.data.nexus.MavenArtifact
-
- All Implemented Interfaces:
java.io.Serializable
@ThreadSafe public class MavenArtifact extends java.lang.Object implements java.io.Serializable
Simple bean representing a Maven Artifact.- Author:
- colezlaw, nhenneaux
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MavenArtifact()
Creates an empty MavenArtifact.MavenArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
Creates a MavenArtifact with the given attributes.MavenArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String url)
Creates a MavenArtifact with the given attributes.MavenArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String artifactUrl, java.lang.String pomUrl)
Creates a MavenArtifact with the given attributes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
derivePomUrl(java.lang.String artifactId, java.lang.String version, java.lang.String artifactUrl)
Tries to determine the URL to the pom.xml.java.lang.String
getArtifactId()
Gets the artifactId.java.lang.String
getArtifactUrl()
Gets the artifactUrl.java.lang.String
getGroupId()
Gets the groupId.java.lang.String
getPomUrl()
Get the value of pomUrl.java.lang.String
getVersion()
Gets the version.void
setArtifactId(java.lang.String artifactId)
Sets the artifactId.void
setArtifactUrl(java.lang.String artifactUrl)
Sets the artifactUrl.void
setGroupId(java.lang.String groupId)
Sets the groupId.void
setPomUrl(java.lang.String pomUrl)
Set the value of pomUrl.void
setVersion(java.lang.String version)
Sets the version.java.lang.String
toString()
Returns the Artifact coordinates as a String.
-
-
-
Constructor Detail
-
MavenArtifact
public MavenArtifact()
Creates an empty MavenArtifact.
-
MavenArtifact
public MavenArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version)
Creates a MavenArtifact with the given attributes.- Parameters:
groupId
- the groupIdartifactId
- the artifactIdversion
- the version
-
MavenArtifact
public MavenArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String url)
Creates a MavenArtifact with the given attributes.- Parameters:
groupId
- the groupIdartifactId
- the artifactIdversion
- the versionurl
- the artifactLink URL
-
MavenArtifact
public MavenArtifact(java.lang.String groupId, java.lang.String artifactId, java.lang.String version, java.lang.String artifactUrl, java.lang.String pomUrl)
Creates a MavenArtifact with the given attributes.- Parameters:
groupId
- the groupIdartifactId
- the artifactIdversion
- the versionartifactUrl
- the artifactLink URLpomUrl
- the pomUrl
-
-
Method Detail
-
derivePomUrl
public static java.lang.String derivePomUrl(java.lang.String artifactId, java.lang.String version, java.lang.String artifactUrl)
Tries to determine the URL to the pom.xml.- Parameters:
artifactId
- the artifact idversion
- the versionartifactUrl
- the artifact URL- Returns:
- the string representation of the URL
-
toString
public java.lang.String toString()
Returns the Artifact coordinates as a String.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the String representation of the artifact coordinates
-
getGroupId
public java.lang.String getGroupId()
Gets the groupId.- Returns:
- the groupId
-
setGroupId
public void setGroupId(java.lang.String groupId)
Sets the groupId.- Parameters:
groupId
- the groupId
-
getArtifactId
public java.lang.String getArtifactId()
Gets the artifactId.- Returns:
- the artifactId
-
setArtifactId
public void setArtifactId(java.lang.String artifactId)
Sets the artifactId.- Parameters:
artifactId
- the artifactId
-
getVersion
public java.lang.String getVersion()
Gets the version.- Returns:
- the version
-
setVersion
public void setVersion(java.lang.String version)
Sets the version.- Parameters:
version
- the version
-
getArtifactUrl
public java.lang.String getArtifactUrl()
Gets the artifactUrl.- Returns:
- the artifactUrl
-
setArtifactUrl
public void setArtifactUrl(java.lang.String artifactUrl)
Sets the artifactUrl.- Parameters:
artifactUrl
- the artifactUrl
-
getPomUrl
public java.lang.String getPomUrl()
Get the value of pomUrl.- Returns:
- the value of pomUrl
-
setPomUrl
public void setPomUrl(java.lang.String pomUrl)
Set the value of pomUrl.- Parameters:
pomUrl
- new value of pomUrl
-
-