Class VulnerableSoftwareBuilder
- java.lang.Object
-
- us.springett.parsers.cpe.CpeBuilder
-
- org.owasp.dependencycheck.dependency.VulnerableSoftwareBuilder
-
public class VulnerableSoftwareBuilder extends us.springett.parsers.cpe.CpeBuilder
A builder for VulnerableSoftware objects.- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description VulnerableSoftwareBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VulnerableSoftware
build()
Builds the CPE Object.VulnerableSoftwareBuilder
cpe(us.springett.parsers.cpe.Cpe cpe)
Adds a base CPE object to build a vulnerable software object from.VulnerableSoftwareBuilder
edition(java.lang.String edition)
VulnerableSoftwareBuilder
edition(us.springett.parsers.cpe.values.LogicalValue edition)
VulnerableSoftwareBuilder
language(java.lang.String language)
VulnerableSoftwareBuilder
language(us.springett.parsers.cpe.values.LogicalValue language)
VulnerableSoftwareBuilder
other(java.lang.String other)
VulnerableSoftwareBuilder
other(us.springett.parsers.cpe.values.LogicalValue other)
VulnerableSoftwareBuilder
part(java.lang.String part)
VulnerableSoftwareBuilder
part(us.springett.parsers.cpe.values.Part part)
VulnerableSoftwareBuilder
product(java.lang.String product)
VulnerableSoftwareBuilder
product(us.springett.parsers.cpe.values.LogicalValue product)
protected void
reset()
Resets the Vulnerable Software Builder to a clean state.VulnerableSoftwareBuilder
swEdition(java.lang.String swEdition)
VulnerableSoftwareBuilder
swEdition(us.springett.parsers.cpe.values.LogicalValue swEdition)
VulnerableSoftwareBuilder
targetHw(java.lang.String targetHw)
VulnerableSoftwareBuilder
targetHw(us.springett.parsers.cpe.values.LogicalValue targetHw)
VulnerableSoftwareBuilder
targetSw(java.lang.String targetSw)
VulnerableSoftwareBuilder
targetSw(us.springett.parsers.cpe.values.LogicalValue targetSw)
VulnerableSoftwareBuilder
update(java.lang.String update)
VulnerableSoftwareBuilder
update(us.springett.parsers.cpe.values.LogicalValue update)
VulnerableSoftwareBuilder
vendor(java.lang.String vendor)
VulnerableSoftwareBuilder
vendor(us.springett.parsers.cpe.values.LogicalValue vendor)
VulnerableSoftwareBuilder
version(java.lang.String version)
VulnerableSoftwareBuilder
version(us.springett.parsers.cpe.values.LogicalValue version)
VulnerableSoftwareBuilder
versionEndExcluding(java.lang.String versionEndExcluding)
The ending range, excluding the specified version, for matching vulnerable software.VulnerableSoftwareBuilder
versionEndIncluding(java.lang.String versionEndIncluding)
The ending range, including the specified version, for matching vulnerable software.VulnerableSoftwareBuilder
versionStartExcluding(java.lang.String versionStartExcluding)
The starting range, excluding the specified version, for matching vulnerable software.VulnerableSoftwareBuilder
versionStartIncluding(java.lang.String versionStartIncluding)
The starting range, including the specified version, for matching vulnerable software.VulnerableSoftwareBuilder
vulnerable(boolean vulnerable)
A flag indicating whether this represents a vulnerable software object.VulnerableSoftwareBuilder
wfEdition(java.lang.String edition)
VulnerableSoftwareBuilder
wfLanguage(java.lang.String language)
VulnerableSoftwareBuilder
wfOther(java.lang.String other)
VulnerableSoftwareBuilder
wfProduct(java.lang.String product)
VulnerableSoftwareBuilder
wfSwEdition(java.lang.String swEdition)
VulnerableSoftwareBuilder
wfTargetHw(java.lang.String targetHw)
VulnerableSoftwareBuilder
wfTargetSw(java.lang.String targetSw)
VulnerableSoftwareBuilder
wfUpdate(java.lang.String update)
VulnerableSoftwareBuilder
wfVendor(java.lang.String vendor)
VulnerableSoftwareBuilder
wfVersion(java.lang.String version)
-
-
-
Method Detail
-
build
public VulnerableSoftware build() throws us.springett.parsers.cpe.exceptions.CpeValidationException
Builds the CPE Object.- Overrides:
build
in classus.springett.parsers.cpe.CpeBuilder
- Returns:
- the CPE Object
- Throws:
us.springett.parsers.cpe.exceptions.CpeValidationException
- thrown if one of the CPE components is invalid
-
reset
protected void reset()
Resets the Vulnerable Software Builder to a clean state.- Overrides:
reset
in classus.springett.parsers.cpe.CpeBuilder
-
cpe
public VulnerableSoftwareBuilder cpe(us.springett.parsers.cpe.Cpe cpe)
Adds a base CPE object to build a vulnerable software object from.- Parameters:
cpe
- the base CPE- Returns:
- a reference to the builder
-
versionEndExcluding
public VulnerableSoftwareBuilder versionEndExcluding(java.lang.String versionEndExcluding)
The ending range, excluding the specified version, for matching vulnerable software.- Parameters:
versionEndExcluding
- the version range- Returns:
- a reference to the builder
-
versionEndIncluding
public VulnerableSoftwareBuilder versionEndIncluding(java.lang.String versionEndIncluding)
The ending range, including the specified version, for matching vulnerable software.- Parameters:
versionEndIncluding
- the version range- Returns:
- a reference to the builder
-
versionStartExcluding
public VulnerableSoftwareBuilder versionStartExcluding(java.lang.String versionStartExcluding)
The starting range, excluding the specified version, for matching vulnerable software.- Parameters:
versionStartExcluding
- the version range- Returns:
- a reference to the builder
-
versionStartIncluding
public VulnerableSoftwareBuilder versionStartIncluding(java.lang.String versionStartIncluding)
The starting range, including the specified version, for matching vulnerable software.- Parameters:
versionStartIncluding
- the version range- Returns:
- a reference to the builder
-
vulnerable
public VulnerableSoftwareBuilder vulnerable(boolean vulnerable)
A flag indicating whether this represents a vulnerable software object.- Parameters:
vulnerable
- whether or not this VulnerableSoftware object represents an actually vulnerable package- Returns:
- a reference to the builder
-
wfOther
public VulnerableSoftwareBuilder wfOther(java.lang.String other)
- Overrides:
wfOther
in classus.springett.parsers.cpe.CpeBuilder
-
wfTargetHw
public VulnerableSoftwareBuilder wfTargetHw(java.lang.String targetHw)
- Overrides:
wfTargetHw
in classus.springett.parsers.cpe.CpeBuilder
-
wfTargetSw
public VulnerableSoftwareBuilder wfTargetSw(java.lang.String targetSw)
- Overrides:
wfTargetSw
in classus.springett.parsers.cpe.CpeBuilder
-
wfSwEdition
public VulnerableSoftwareBuilder wfSwEdition(java.lang.String swEdition)
- Overrides:
wfSwEdition
in classus.springett.parsers.cpe.CpeBuilder
-
wfLanguage
public VulnerableSoftwareBuilder wfLanguage(java.lang.String language)
- Overrides:
wfLanguage
in classus.springett.parsers.cpe.CpeBuilder
-
wfEdition
public VulnerableSoftwareBuilder wfEdition(java.lang.String edition)
- Overrides:
wfEdition
in classus.springett.parsers.cpe.CpeBuilder
-
wfUpdate
public VulnerableSoftwareBuilder wfUpdate(java.lang.String update)
- Overrides:
wfUpdate
in classus.springett.parsers.cpe.CpeBuilder
-
wfVersion
public VulnerableSoftwareBuilder wfVersion(java.lang.String version)
- Overrides:
wfVersion
in classus.springett.parsers.cpe.CpeBuilder
-
wfProduct
public VulnerableSoftwareBuilder wfProduct(java.lang.String product)
- Overrides:
wfProduct
in classus.springett.parsers.cpe.CpeBuilder
-
wfVendor
public VulnerableSoftwareBuilder wfVendor(java.lang.String vendor)
- Overrides:
wfVendor
in classus.springett.parsers.cpe.CpeBuilder
-
other
public VulnerableSoftwareBuilder other(us.springett.parsers.cpe.values.LogicalValue other)
- Overrides:
other
in classus.springett.parsers.cpe.CpeBuilder
-
targetHw
public VulnerableSoftwareBuilder targetHw(us.springett.parsers.cpe.values.LogicalValue targetHw)
- Overrides:
targetHw
in classus.springett.parsers.cpe.CpeBuilder
-
targetSw
public VulnerableSoftwareBuilder targetSw(us.springett.parsers.cpe.values.LogicalValue targetSw)
- Overrides:
targetSw
in classus.springett.parsers.cpe.CpeBuilder
-
swEdition
public VulnerableSoftwareBuilder swEdition(us.springett.parsers.cpe.values.LogicalValue swEdition)
- Overrides:
swEdition
in classus.springett.parsers.cpe.CpeBuilder
-
language
public VulnerableSoftwareBuilder language(us.springett.parsers.cpe.values.LogicalValue language)
- Overrides:
language
in classus.springett.parsers.cpe.CpeBuilder
-
update
public VulnerableSoftwareBuilder update(us.springett.parsers.cpe.values.LogicalValue update)
- Overrides:
update
in classus.springett.parsers.cpe.CpeBuilder
-
version
public VulnerableSoftwareBuilder version(us.springett.parsers.cpe.values.LogicalValue version)
- Overrides:
version
in classus.springett.parsers.cpe.CpeBuilder
-
product
public VulnerableSoftwareBuilder product(us.springett.parsers.cpe.values.LogicalValue product)
- Overrides:
product
in classus.springett.parsers.cpe.CpeBuilder
-
vendor
public VulnerableSoftwareBuilder vendor(us.springett.parsers.cpe.values.LogicalValue vendor)
- Overrides:
vendor
in classus.springett.parsers.cpe.CpeBuilder
-
other
public VulnerableSoftwareBuilder other(java.lang.String other)
- Overrides:
other
in classus.springett.parsers.cpe.CpeBuilder
-
targetHw
public VulnerableSoftwareBuilder targetHw(java.lang.String targetHw)
- Overrides:
targetHw
in classus.springett.parsers.cpe.CpeBuilder
-
targetSw
public VulnerableSoftwareBuilder targetSw(java.lang.String targetSw)
- Overrides:
targetSw
in classus.springett.parsers.cpe.CpeBuilder
-
swEdition
public VulnerableSoftwareBuilder swEdition(java.lang.String swEdition)
- Overrides:
swEdition
in classus.springett.parsers.cpe.CpeBuilder
-
language
public VulnerableSoftwareBuilder language(java.lang.String language)
- Overrides:
language
in classus.springett.parsers.cpe.CpeBuilder
-
update
public VulnerableSoftwareBuilder update(java.lang.String update)
- Overrides:
update
in classus.springett.parsers.cpe.CpeBuilder
-
version
public VulnerableSoftwareBuilder version(java.lang.String version)
- Overrides:
version
in classus.springett.parsers.cpe.CpeBuilder
-
product
public VulnerableSoftwareBuilder product(java.lang.String product)
- Overrides:
product
in classus.springett.parsers.cpe.CpeBuilder
-
vendor
public VulnerableSoftwareBuilder vendor(java.lang.String vendor)
- Overrides:
vendor
in classus.springett.parsers.cpe.CpeBuilder
-
part
public VulnerableSoftwareBuilder part(java.lang.String part) throws us.springett.parsers.cpe.exceptions.CpeParsingException
- Overrides:
part
in classus.springett.parsers.cpe.CpeBuilder
- Throws:
us.springett.parsers.cpe.exceptions.CpeParsingException
-
part
public VulnerableSoftwareBuilder part(us.springett.parsers.cpe.values.Part part)
- Overrides:
part
in classus.springett.parsers.cpe.CpeBuilder
-
edition
public VulnerableSoftwareBuilder edition(us.springett.parsers.cpe.values.LogicalValue edition)
- Overrides:
edition
in classus.springett.parsers.cpe.CpeBuilder
-
edition
public VulnerableSoftwareBuilder edition(java.lang.String edition)
- Overrides:
edition
in classus.springett.parsers.cpe.CpeBuilder
-
-