public class PurlIdentifier extends Object implements Identifier
| Constructor and Description |
|---|
PurlIdentifier(com.github.packageurl.PackageURL purl,
Confidence confidence)
Constructs a new Package-URL identifier.
|
PurlIdentifier(com.github.packageurl.PackageURL purl,
String url,
Confidence confidence)
Constructs a new Package-URL identifier.
|
PurlIdentifier(String type,
String name,
String version,
Confidence confidence)
Constructs a new Package-URL identifier.
|
PurlIdentifier(String type,
String namespace,
String name,
String version,
Confidence confidence)
Constructs a new Package-URL identifier.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(@NotNull Identifier o) |
boolean |
equals(Object obj) |
Confidence |
getConfidence()
Get the value of confidence.
|
String |
getName()
Returns the Package URL name.
|
String |
getNamespace()
Returns the Package URL name space.
|
String |
getNotes()
Get the value of notes from suppression notes.
|
String |
getUrl()
Get the value of URL.
|
String |
getValue()
Get the string representation of the Identifier.
|
String |
getVersion()
Returns the Package URL version.
|
int |
hashCode() |
void |
setConfidence(Confidence confidence)
Set the value of confidence.
|
void |
setNotes(String notes)
Set the value of notes.
|
void |
setUrl(String url)
Set the value of URL.
|
String |
toGav()
Returns the GAV representation of the Package URL as utilized in gradle
builds.
|
String |
toString()
Returns the CPE 2.3 formatted string.
|
public PurlIdentifier(com.github.packageurl.PackageURL purl,
Confidence confidence)
purl - the Package-URL objectconfidence - the confidence that the identifier is correct for the
given dependencypublic PurlIdentifier(com.github.packageurl.PackageURL purl,
String url,
Confidence confidence)
purl - the Package-URL objecturl - the URL for the identifierconfidence - the confidence that the identifier is correct for the
given dependencypublic PurlIdentifier(String type, String name, String version, Confidence confidence) throws com.github.packageurl.MalformedPackageURLException
type - the type of package-URLname - the nameversion - the versionconfidence - the confidence that the identifier is correct for the
given dependencycom.github.packageurl.MalformedPackageURLException - thrown if the type, name space,
name, and version cannot be converted into a package-URLpublic PurlIdentifier(String type, String namespace, String name, String version, Confidence confidence) throws com.github.packageurl.MalformedPackageURLException
type - the type of package-URLnamespace - the name spacename - the nameversion - the versionconfidence - the confidence that the identifier is correct for the
given dependencycom.github.packageurl.MalformedPackageURLException - thrown if the type, name space,
name, and version cannot be converted into a package-URLpublic Confidence getConfidence()
IdentifiergetConfidence in interface Identifierpublic String getNotes()
IdentifiergetNotes in interface Identifierpublic String getUrl()
IdentifiergetUrl in interface Identifierpublic void setConfidence(Confidence confidence)
setConfidence in interface Identifierconfidence - the value of confidencepublic void setUrl(String url)
setUrl in interface Identifierurl - the value of URLpublic void setNotes(String notes)
IdentifiersetNotes in interface Identifiernotes - new value of notespublic String toString()
public String getValue()
IdentifiergetValue in interface Identifierpublic String getNamespace()
public String getName()
PackageURL.getName()public String getVersion()
PackageURL.getVersion()public String toGav()
public int compareTo(@NotNull
@NotNull Identifier o)
compareTo in interface Comparable<Identifier>Copyright © 2012–2020 OWASP. All rights reserved.