Class Statement

java.lang.Object
org.apache.commons.release.plugin.slsa.v1_2.Statement

public class Statement extends Object
In-toto v1 attestation envelope that binds a set of subject artifacts to an SLSA provenance predicate.
Since:
1.10.0
See Also:
  • Field Details

  • Constructor Details

    • Statement

      public Statement()
      Creates a new Statement instance.
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getType

      public String getType()
      Gets the JSON object type.
      Returns:
      Always "https://in-toto.io/Statement/v1".
    • getPredicate

      Gets the provenance predicate.

      An unset predicate is treated the same as an empty predicate. The predicate may be omitted if predicateType fully describes the predicate.

      Returns:
      The provenance predicate, or null if not set.
    • getPredicateType

      Gets the URI identifying the type of the predicate.
      Returns:
      The predicate type URI, or null if no predicate has been set.
    • getSubject

      Gets the set of software artifacts that the attestation applies to.

      Each element represents a single artifact. Artifacts are matched purely by digest, regardless of content type.

      Returns:
      The list of subject artifacts, or null if not set.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setPredicate

      public Statement setPredicate(Provenance predicate)
      Sets the provenance predicate and automatically assigns predicateType to the SLSA provenance v1 URI.
      Parameters:
      predicate - The provenance predicate.
      Returns:
      this for chaining.
    • setSubject

      Sets the set of software artifacts that the attestation applies to.
      Parameters:
      subject - The list of subject artifacts.
      Returns:
      this for chaining.
    • toString

      public String toString()
      Overrides:
      toString in class Object