Enum Class SchemaVersion

java.lang.Object
java.lang.Enum<SchemaVersion>
org.cyclonedx.gradle.model.SchemaVersion
All Implemented Interfaces:
Serializable, Comparable<SchemaVersion>, Constable

public enum SchemaVersion extends Enum<SchemaVersion>
Plugin-internal, Core-free stand-in for the CycloneDX schema selectors the plugin currently knows about (1.0 through 1.7). It exists solely to capture the structural differences the plugin branches on when building a Bom, so those call sites do not need to reason about org.cyclonedx.Version directly.

This type deliberately does not import anything from org.cyclonedx.*. See SchemaVersionMapper for the one-way translation from Core's org.cyclonedx.Version.

  • Enum Constant Details

  • Method Details

    • values

      public static SchemaVersion[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SchemaVersion valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • usesToolInformation

      public boolean usesToolInformation()
      Returns:
      true for schema 1.5 and above, where CycloneDX metadata tooling is expressed as ToolInformation (a list of Components) rather than the legacy Tool.
    • usesManufacturer

      public boolean usesManufacturer()
      Returns:
      true for schema 1.6 and above, where the metadata author is expressed via metadata.manufacturer rather than the legacy metadata.manufacture.
    • includesExtendedHashes

      public boolean includesExtendedHashes()
      Returns:
      true for schema 1.2 and above, where an artifact carries SHA-384 and SHA3-384 hashes in addition to the set every schema version carries. Core rejects SHA3-384 below 1.2 via its VersionFilter.