Package org.projectnessie.model
Interface Detached
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.projectnessie.model.ImmutableDetached.Builderbuilder()default voidValidation rule usingValidation.validateHashOrRelativeSpec(String).@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.") StringgetHash()Commit ID of the reference.Returns aReferenceMetadatainstance that contains additional metadata about this reference.default StringgetName()Human-readable reference name.default Reference.ReferenceTypegetType()static DetachedMethods inherited from interface org.projectnessie.model.Reference
toPathString
-
Field Details
-
REF_NAME
- See Also:
-
-
Method Details
-
getName
Description copied from interface:ReferenceHuman-readable reference name. -
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:ReferenceCommit 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).
-
getMetadata
Description copied from interface:ReferenceReturns aReferenceMetadatainstance that contains additional metadata about this reference. Note that this is only added by the server when explicitly requested by the client.- Specified by:
getMetadatain interfaceReference- Returns:
- A
ReferenceMetadatainstance 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()Validation rule usingValidation.validateHashOrRelativeSpec(String). -
getType
-
builder
static org.projectnessie.model.ImmutableDetached.Builder builder() -
of
-