public class CpeBuilder extends Object
| Constructor and Description |
|---|
CpeBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Cpe |
build()
Builds the CPE Object.
|
CpeBuilder |
edition(LogicalValue edition)
Sets the edition for the CPE entry.
|
CpeBuilder |
edition(String edition)
Sets the edition for the CPE entry.
|
protected String |
getEdition()
Get the value of edition.
|
protected String |
getLanguage()
Get the value of language.
|
protected String |
getOther()
Get the value of other.
|
protected Part |
getPart()
Get the value of part.
|
protected String |
getProduct()
Get the value of product.
|
protected String |
getSwEdition()
Get the value of swEdition.
|
protected String |
getTargetHw()
Get the value of targetHw.
|
protected String |
getTargetSw()
Get the value of targetSw.
|
protected String |
getUpdate()
Get the value of update.
|
protected String |
getVendor()
Get the value of vendor.
|
protected String |
getVersion()
Get the value of version.
|
CpeBuilder |
language(LogicalValue language)
Sets the language for the CPE entry.
|
CpeBuilder |
language(String language)
Sets the language for the CPE entry.
|
CpeBuilder |
other(LogicalValue other)
Sets the other component for the CPE entry.
|
CpeBuilder |
other(String other)
Sets the other component for the CPE entry.
|
CpeBuilder |
part(Part part)
Sets the type for the CPE entry: application, operating system, or
hardware.
|
CpeBuilder |
part(String part)
Sets the type for the CPE entry: application, operating system, or
hardware.
|
CpeBuilder |
product(LogicalValue product)
Sets the product for the CPE entry.
|
CpeBuilder |
product(String product)
Sets the product for the CPE entry.
|
protected void |
reset()
Resets the CPE Builder to a clean state.
|
CpeBuilder |
swEdition(LogicalValue swEdition)
Sets the software edition for the CPE entry.
|
CpeBuilder |
swEdition(String swEdition)
Sets the software edition for the CPE entry.
|
CpeBuilder |
targetHw(LogicalValue targetHw)
Sets the target hardware environment for the CPE entry.
|
CpeBuilder |
targetHw(String targetHw)
Sets the target hardware environment for the CPE entry.
|
CpeBuilder |
targetSw(LogicalValue targetSw)
Sets the target software environment for the CPE entry.
|
CpeBuilder |
targetSw(String targetSw)
Sets the target software environment for the CPE entry.
|
CpeBuilder |
update(LogicalValue update)
Sets the update version for the CPE entry.
|
CpeBuilder |
update(String update)
Sets the update version for the CPE entry.
|
CpeBuilder |
vendor(LogicalValue vendor)
Sets the vendor for the CPE entry.
|
CpeBuilder |
vendor(String vendor)
Sets the vendor for the CPE entry.
|
CpeBuilder |
version(LogicalValue version)
Sets the version for the CPE entry.
|
CpeBuilder |
version(String version)
Sets the version for the CPE entry.
|
CpeBuilder |
wfEdition(String edition)
Sets the edition for the CPE entry as a Well Formed string.
|
CpeBuilder |
wfLanguage(String language)
Sets the language for the CPE entry as a Well Formed string.
|
CpeBuilder |
wfOther(String other)
Sets the other component for the CPE entry as a Well Formed Name
attribute.
|
CpeBuilder |
wfProduct(String product)
Sets the product for the CPE entry as a Well Formed string.
|
CpeBuilder |
wfSwEdition(String swEdition)
Sets the software edition for the CPE entry as a Well Formed Name
attribute.
|
CpeBuilder |
wfTargetHw(String targetHw)
Sets the target hardware environment for the CPE entry as a Well Formed
Name attribute.
|
CpeBuilder |
wfTargetSw(String targetSw)
Sets the target software environment for the CPE entry as a Well Formed
Name attribute.
|
CpeBuilder |
wfUpdate(String update)
Sets the update version for the CPE entry as a Well Formed string.
|
CpeBuilder |
wfVendor(String vendor)
Sets the vendor for the CPE entry as a Well Formed string.
|
CpeBuilder |
wfVersion(String version)
Sets the version for the CPE entry as a Well Formed string.
|
protected void reset()
public CpeBuilder part(Part part)
Sets the type for the CPE entry: application, operating system, or hardware.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
part - the type of CPE entry: application, operating system, or
hardwarepublic CpeBuilder part(String part) throws CpeParsingException
Sets the type for the CPE entry: application, operating system, or hardware.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
part - the type of CPE entry: application, operating system, or
hardwareCpeParsingException - thrown if an invalid part type is specifiedpublic CpeBuilder vendor(String vendor)
Sets the vendor for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
vendor - the vendor namepublic CpeBuilder product(String product)
Sets the product for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
product - the product namepublic CpeBuilder version(String version)
Sets the version for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
version - the version numberpublic CpeBuilder update(String update)
Sets the update version for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
update - the update versionpublic CpeBuilder edition(String edition)
Sets the edition for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
edition - the edition namepublic CpeBuilder language(String language)
Sets the language for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
language - the language namepublic CpeBuilder swEdition(String swEdition)
Sets the software edition for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
swEdition - the software editionpublic CpeBuilder targetSw(String targetSw)
Sets the target software environment for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
targetSw - the target software environmentpublic CpeBuilder targetHw(String targetHw)
Sets the target hardware environment for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
targetHw - the target hardware environmentpublic CpeBuilder other(String other)
Sets the other component for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
other - the other componentpublic CpeBuilder vendor(LogicalValue vendor)
Sets the vendor for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
vendor - the logical value of NA or ANYpublic CpeBuilder product(LogicalValue product)
Sets the product for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
product - the logical value of NA or ANYpublic CpeBuilder version(LogicalValue version)
Sets the version for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
version - the logical value of NA or ANYpublic CpeBuilder update(LogicalValue update)
Sets the update version for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
update - the logical value of NA or ANYpublic CpeBuilder edition(LogicalValue edition)
Sets the edition for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
edition - the logical value of NA or ANYpublic CpeBuilder language(LogicalValue language)
Sets the language for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
language - the logical value of NA or ANYpublic CpeBuilder swEdition(LogicalValue swEdition)
Sets the software edition for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
swEdition - the logical value of NA or ANYpublic CpeBuilder targetSw(LogicalValue targetSw)
Sets the target software environment for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
targetSw - the logical value of NA or ANYpublic CpeBuilder targetHw(LogicalValue targetHw)
Sets the target hardware environment for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
targetHw - the logical value of NA or ANYpublic CpeBuilder other(LogicalValue other)
Sets the other component for the CPE entry.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
other - the logical value of NA or ANYpublic CpeBuilder wfVendor(String vendor)
Sets the vendor for the CPE entry as a Well Formed string. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
vendor - the vendor namepublic CpeBuilder wfProduct(String product)
Sets the product for the CPE entry as a Well Formed string. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
product - the product namepublic CpeBuilder wfVersion(String version)
Sets the version for the CPE entry as a Well Formed string. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
version - the version numberpublic CpeBuilder wfUpdate(String update)
Sets the update version for the CPE entry as a Well Formed string. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
update - the update versionpublic CpeBuilder wfEdition(String edition)
Sets the edition for the CPE entry as a Well Formed string. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
edition - the edition namepublic CpeBuilder wfLanguage(String language)
Sets the language for the CPE entry as a Well Formed string. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
language - the language namepublic CpeBuilder wfSwEdition(String swEdition)
Sets the software edition for the CPE entry as a Well Formed Name attribute. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
swEdition - the software editionpublic CpeBuilder wfTargetSw(String targetSw)
Sets the target software environment for the CPE entry as a Well Formed Name attribute. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
targetSw - the target software environmentpublic CpeBuilder wfTargetHw(String targetHw)
Sets the target hardware environment for the CPE entry as a Well Formed Name attribute. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
targetHw - the target hardware environmentpublic CpeBuilder wfOther(String other)
Sets the other component for the CPE entry as a Well Formed Name attribute. See the CPE 2.3 Specification for more information on Well Formed Names.
cpe:2.3:[part]:[vendor]:[product]:[version]:[update]:[edition]:[language]:[sw_edition]:[target_sw]:[target_hw]:[other]
other - the other componentprotected Part getPart()
protected String getVendor()
protected String getProduct()
protected String getVersion()
protected String getUpdate()
protected String getEdition()
protected String getLanguage()
protected String getSwEdition()
protected String getTargetSw()
protected String getTargetHw()
protected String getOther()
public Cpe build() throws CpeValidationException
CpeValidationException - thrown if one of the CPE components is
invalidCopyright © 2018–2025. All rights reserved.