Package org.apache.ant.cyclonedx
Class OutputFormat
- java.lang.Object
-
- org.apache.tools.ant.types.EnumeratedAttribute
-
- org.apache.ant.cyclonedx.OutputFormat
-
public class OutputFormat extends org.apache.tools.ant.types.EnumeratedAttributeCycloneDX format to use for the SBOM.Accepts the enum constants like
JSONas well as the lowercase versionjsonand the special valueall. The values other thanallare directly provided by CycloneDX Core's enum.allmeans the task will emit SBOMs in all formats supported by the selectedSpecVersion- i.e. only XML for versions 1.1 and 1.2 and both JSON and XML afterwards.
-
-
Field Summary
Fields Modifier and Type Field Description static OutputFormatJSONJSON output format.
-
Constructor Summary
Constructors Constructor Description OutputFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<org.cyclonedx.Format>getCycloneDxFormats(org.cyclonedx.Version version)Translates this instance toFormats.java.lang.String[]getValues()
-
-
-
Field Detail
-
JSON
public static final OutputFormat JSON
JSON output format.
-
-
Method Detail
-
getValues
public java.lang.String[] getValues()
- Specified by:
getValuesin classorg.apache.tools.ant.types.EnumeratedAttribute
-
getCycloneDxFormats
public java.lang.Iterable<org.cyclonedx.Format> getCycloneDxFormats(org.cyclonedx.Version version)
Translates this instance toFormats.- Parameters:
version- spec version- Returns:
- all suported formats of version
- Throws:
org.apache.tools.ant.BuildException- if the value can not be translated.
-
-