Interface TreeApi
-
@Consumes("application/json") @Path("trees") public interface TreeApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassignBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String oldHash, @Valid @NotNull Branch branch)Update a branch.voidassignTag(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String tagName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String oldHash, @Valid @NotNull Tag tag)Update a tag.BranchcommitMultipleOperations(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash, @Valid @NotNull Operations operations)ReferencecreateReference(@Valid @NotNull Reference reference)Create a new reference.voiddeleteBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash)Delete a branch.voiddeleteTag(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String tagName, @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash)Delete a tag.List<Reference>getAllReferences()Get all references.LogResponsegetCommitLog(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String ref, @NotNull @Valid CommitLogParams params)Retrieve the commit log for a ref, potentially truncated by the backend.BranchgetDefaultBranch()Get details for the default reference.EntriesResponsegetEntries(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String refName, @NotNull @Valid EntriesParams params)Retrieve objects for a ref, potentially truncated by the backend.ReferencegetReferenceByName(@NotNull @Pattern(regexp="^(([0-9a-fA-F]{16,64})|([A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?))$",message="Reference must be either a reference name or hash, start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain .. or consist of the hex representation of 8-32 bytes") String refName)Get details of a particular ref, if it exists.voidmergeRefIntoBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash, @Valid @NotNull Merge merge)merge mergeRef onto ref.voidtransplantCommitsIntoBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash, String message, @Valid Transplant transplant)cherry pick a set of commits into a branch.
-
-
-
Method Detail
-
getAllReferences
@GET @Produces("application/json") List<Reference> getAllReferences()Get all references.
-
getDefaultBranch
@GET @Produces("application/json") @Path("tree") Branch getDefaultBranch() throws NessieNotFoundExceptionGet details for the default reference.- Throws:
NessieNotFoundException
-
createReference
@POST @Path("tree") Reference createReference(@Valid @NotNull @Valid @NotNull Reference reference) throws NessieNotFoundException, NessieConflictExceptionCreate a new reference.
-
getReferenceByName
@GET @Produces("application/json") @Path("tree/{ref}") Reference getReferenceByName(@NotNull @Pattern(regexp="^(([0-9a-fA-F]{16,64})|([A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?))$",message="Reference must be either a reference name or hash, start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain .. or consist of the hex representation of 8-32 bytes") @PathParam("ref") @NotNull @Pattern(regexp="^(([0-9a-fA-F]{16,64})|([A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?))$",message="Reference must be either a reference name or hash, start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain .. or consist of the hex representation of 8-32 bytes") String refName) throws NessieNotFoundExceptionGet details of a particular ref, if it exists.- Throws:
NessieNotFoundException
-
getEntries
@GET @Produces("application/json") @Path("tree/{ref}/entries") EntriesResponse getEntries(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("ref") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String refName, @NotNull @Valid @BeanParam @NotNull @Valid EntriesParams params) throws NessieNotFoundExceptionRetrieve objects for a ref, potentially truncated by the backend.Retrieves up to
maxRecordsobjects for the given named reference (tag or branch) or the givenHash. The backend may respect the givenmaxrecords hint, but return less or more entries. Backends may also cap the returned entries at a hard-coded limit, the default REST server implementation has such a hard-coded limit.Invoking
getEntries()does not guarantee to return all commit log entries of a given reference, because the result can be truncated by the backend.To implement paging, check
EntriesResponse.hasMore()and, iftrue, pass the value ofEntriesResponse.getToken()in the next invocation ofgetEntries()as thepageTokenparameter.See
org.projectnessie.client.StreamingUtilinnessie-client.- Throws:
NessieNotFoundException
-
getCommitLog
@GET @Produces("application/json") @Path("tree/{ref}/log") LogResponse getCommitLog(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("ref") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String ref, @NotNull @Valid @BeanParam @NotNull @Valid CommitLogParams params) throws NessieNotFoundExceptionRetrieve the commit log for a ref, potentially truncated by the backend.Retrieves up to
maxRecordscommit-log-entries starting at the HEAD of the given named reference (tag or branch) or the givenHash. The backend may respect the givenmaxrecords hint, but return less or more entries. Backends may also cap the returned entries at a hard-coded limit, the default REST server implementation has such a hard-coded limit.Invoking
getCommitLog()does not guarantee to return all commit log entries of a given reference, because the result can be truncated by the backend.To implement paging, check
LogResponse.hasMore()and, iftrue, pass the value ofLogResponse.getToken()in the next invocation ofgetCommitLog()as thepageTokenparameter.See
org.projectnessie.client.StreamingUtilinnessie-client.- Throws:
NessieNotFoundException
-
assignTag
@PUT @Path("tag/{tagName}") void assignTag(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("tagName") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String tagName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @QueryParam("expectedHash") @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String oldHash, @Valid @NotNull @Valid @NotNull Tag tag) throws NessieNotFoundException, NessieConflictExceptionUpdate a tag.
-
deleteTag
@DELETE @Path("tag/{tagName}") void deleteTag(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("tagName") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String tagName, @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @QueryParam("expectedHash") @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash) throws NessieConflictException, NessieNotFoundExceptionDelete a tag.
-
assignBranch
@PUT @Path("branch/{branchName}") void assignBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("branchName") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @QueryParam("expectedHash") @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String oldHash, @Valid @NotNull @Valid @NotNull Branch branch) throws NessieNotFoundException, NessieConflictExceptionUpdate a branch.
-
deleteBranch
@DELETE @Path("branch/{branchName}") void deleteBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("branchName") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @QueryParam("expectedHash") @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash) throws NessieConflictException, NessieNotFoundExceptionDelete a branch.
-
transplantCommitsIntoBranch
@POST @Path("branch/{branchName}/transplant") void transplantCommitsIntoBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("branchName") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @QueryParam("expectedHash") @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash, @QueryParam("message") String message, @Valid @Valid Transplant transplant) throws NessieNotFoundException, NessieConflictExceptioncherry pick a set of commits into a branch.
-
mergeRefIntoBranch
@POST @Path("branch/{branchName}/merge") void mergeRefIntoBranch(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("branchName") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @QueryParam("expectedHash") @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash, @Valid @NotNull @Valid @NotNull Merge merge) throws NessieNotFoundException, NessieConflictExceptionmerge mergeRef onto ref.
-
commitMultipleOperations
@POST @Path("branch/{branchName}/commit") @Consumes("application/json") Branch commitMultipleOperations(@NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") @PathParam("branchName") @NotNull @Pattern(regexp="^[A-Za-z](((?![.][.])[A-Za-z0-9./_-])*[A-Za-z0-9._-])?$",message="Reference name must start with a letter, followed by letters, digits, a ./_- character, not end with a slash, not contain ..") String branchName, @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") @QueryParam("expectedHash") @NotNull @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash, @Valid @NotNull @Valid @NotNull Operations operations) throws NessieNotFoundException, NessieConflictException
-
-