Interface Detached

All Superinterfaces:
Base, Reference

@Immutable public interface Detached extends Reference
API representation of a detached Nessie commit, a commit without a named reference. The reserved reference name "DETACHED" is used to indicate "datached" commit IDs. This object is akin to a Ref in Git terminology.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.projectnessie.model.Reference

    Reference.ReferenceType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.projectnessie.model.ImmutableDetached.Builder
     
    default void
    @NotEmpty @NotEmpty @Pattern(regexp="^([0-9a-fA-F]{8,64})?((?:([~*^])([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{1,9}Z|([0-9]+)))*)$",message="Hash with optional relative part must consist of either a valid commit hash (which in turn must consist of the hex representation of 4-32 bytes), or a valid relative part (which must be either \'~\' + a number representing the n-th predecessor of a commit, \'^\' + a number representing the n-th parent within a commit, or \'*\' + a number representing the created timestamp of a commit, in milliseconds since epoch or in ISO-8601 format), or both.") @Pattern(regexp="^([0-9a-fA-F]{8,64})?((?:([~*^])([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{1,9}Z|([0-9]+)))*)$",message="Hash with optional relative part must consist of either a valid commit hash (which in turn must consist of the hex representation of 4-32 bytes), or a valid relative part (which must be either \'~\' + a number representing the n-th predecessor of a commit, \'^\' + a number representing the n-th parent within a commit, or \'*\' + a number representing the created timestamp of a commit, in milliseconds since epoch or in ISO-8601 format), or both.") String
    Commit ID of the reference.
    Returns a ReferenceMetadata instance that contains additional metadata about this reference.
    default String
    Human-readable reference name.
     
    static Detached
    of(String hash)
     

    Methods inherited from interface org.projectnessie.model.Reference

    toPathString
  • Field Details

  • Method Details

    • getName

      @Redacted default String getName()
      Description copied from interface: Reference
      Human-readable reference name.
      Specified by:
      getName in interface Reference
    • getHash

      @NotEmpty @NotEmpty @Parameter(order=1) @Pattern(regexp="^([0-9a-fA-F]{8,64})?((?:([~*^])([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{1,9}Z|([0-9]+)))*)$", message="Hash with optional relative part must consist of either a valid commit hash (which in turn must consist of the hex representation of 4-32 bytes), or a valid relative part (which must be either \'~\' + a number representing the n-th predecessor of a commit, \'^\' + a number representing the n-th parent within a commit, or \'*\' + a number representing the created timestamp of a commit, in milliseconds since epoch or in ISO-8601 format), or both.") @Pattern(regexp="^([0-9a-fA-F]{8,64})?((?:([~*^])([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{1,9}Z|([0-9]+)))*)$", message="Hash with optional relative part must consist of either a valid commit hash (which in turn must consist of the hex representation of 4-32 bytes), or a valid relative part (which must be either \'~\' + a number representing the n-th predecessor of a commit, \'^\' + a number representing the n-th parent within a commit, or \'*\' + a number representing the created timestamp of a commit, in milliseconds since epoch or in ISO-8601 format), or both.") @NotEmpty @NotEmpty @Pattern(regexp="^([0-9a-fA-F]{8,64})?((?:([~*^])([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{1,9}Z|([0-9]+)))*)$",message="Hash with optional relative part must consist of either a valid commit hash (which in turn must consist of the hex representation of 4-32 bytes), or a valid relative part (which must be either \'~\' + a number representing the n-th predecessor of a commit, \'^\' + a number representing the n-th parent within a commit, or \'*\' + a number representing the created timestamp of a commit, in milliseconds since epoch or in ISO-8601 format), or both.") @Pattern(regexp="^([0-9a-fA-F]{8,64})?((?:([~*^])([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{1,9}Z|([0-9]+)))*)$",message="Hash with optional relative part must consist of either a valid commit hash (which in turn must consist of the hex representation of 4-32 bytes), or a valid relative part (which must be either \'~\' + a number representing the n-th predecessor of a commit, \'^\' + a number representing the n-th parent within a commit, or \'*\' + a number representing the created timestamp of a commit, in milliseconds since epoch or in ISO-8601 format), or both.") String getHash()
      Description copied from interface: Reference
      Commit ID of the reference.

      Will be an "exact" commit ID (no relative parts) when returned from a Nessie server. Might contain relative parts when used as an input to a Nessie API functionality (since Nessie spec 2.1.0).

      Specified by:
      getHash in interface Reference
    • getMetadata

      @Nullable @Nullable @Parameter(order=2) ReferenceMetadata getMetadata()
      Description copied from interface: Reference
      Returns a ReferenceMetadata instance that contains additional metadata about this reference. Note that this is only added by the server when explicitly requested by the client.
      Specified by:
      getMetadata in interface Reference
      Returns:
      A ReferenceMetadata instance that contains additional metadata about this reference. Note that this is only added by the server when explicitly requested by the client.
    • checkHash

      @Check default void checkHash()
      Specified by:
      checkHash in interface Reference
    • getType

      default Reference.ReferenceType getType()
      Specified by:
      getType in interface Reference
    • builder

      static org.projectnessie.model.ImmutableDetached.Builder builder()
    • of

      static Detached of(String hash)