Class BuildMetadata

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

public class BuildMetadata extends Object
Metadata about a build invocation: its identifier and start and finish timestamps.
Since:
1.10.0
See Also:
  • Constructor Details

    • BuildMetadata

      public BuildMetadata()
      Creates a new BuildMetadata instance.
    • BuildMetadata

      public BuildMetadata(String invocationId, OffsetDateTime startedOn, OffsetDateTime finishedOn)
      Creates a new BuildMetadata instance with all fields set.
      Parameters:
      invocationId - identifier for this build invocation.
      startedOn - timestamp when the build started.
      finishedOn - timestamp when the build completed.
  • Method Details

    • equals

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

      Gets the timestamp of when the build completed, serialized as RFC 3339 in UTC ("Z" suffix).
      Returns:
      The completion timestamp, or null if not set.
    • getInvocationId

      Gets the identifier for this build invocation.
      Returns:
      The invocation identifier, or null if not set.
    • getStartedOn

      Gets the timestamp of when the build started, serialized as RFC 3339 in UTC ("Z" suffix).
      Returns:
      The start timestamp, or null if not set.
    • hashCode

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

      Sets the timestamp of when the build completed.
      Parameters:
      finishedOn - The completion timestamp.
      Returns:
      this for chaining.
    • setInvocationId

      public BuildMetadata setInvocationId(String invocationId)
      Sets the identifier for this build invocation.
      Parameters:
      invocationId - The invocation identifier.
      Returns:
      this for chaining.
    • setStartedOn

      Sets the timestamp of when the build started.
      Parameters:
      startedOn - The start timestamp.
      Returns:
      this for chaining.
    • toString

      public String toString()
      Overrides:
      toString in class Object