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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REF_NAME  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static org.projectnessie.model.ImmutableDetached.Builder builder()  
      default void checkHash()
      @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.") java.lang.String getHash()
      Commit ID of the reference.
      ReferenceMetadata getMetadata()
      Returns a ReferenceMetadata instance that contains additional metadata about this reference.
      default java.lang.String getName()
      Human-readable reference name.
      default Reference.ReferenceType getType()  
      static Detached of​(java.lang.String hash)  
    • Method Detail

      • getName

        @Redacted
        default java.lang.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.") java.lang.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.
      • builder

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

        static Detached of​(java.lang.String hash)