Interface TreeApi

  • All Known Subinterfaces:
    HttpTreeApi

    public interface TreeApi
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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 ..") 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.
      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 ..") 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.
      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 ..") 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)  
      Reference createReference​(@Valid @NotNull Reference reference)
      Create a new reference.
      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 ..") 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.
      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 ..") 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.
      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 ..") String ref, @NotNull @Valid CommitLogParams params)
      Retrieve the commit log for a ref, potentially truncated by the backend.
      Branch getDefaultBranch()
      Get details for the default reference.
      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 ..") String refName, @NotNull @Valid EntriesParams params)
      Retrieve objects for a ref, potentially truncated by the backend.
      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") String refName)
      Get details of a particular ref, if it exists.
      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 ..") 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.
      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 ..") 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

        List<Reference> getAllReferences()
        Get all references.
      • getReferenceByName

        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")
                                     @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 NessieNotFoundException
        Get details of a particular ref, if it exists.
        Throws:
        NessieNotFoundException
      • getEntries

        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 ..")
                                   @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
                                   @NotNull @Valid EntriesParams params)
                            throws NessieNotFoundException
        Retrieve objects for a ref, potentially truncated by the backend.

        Retrieves up to maxRecords objects for the given named reference (tag or branch) or the given Hash. The backend may respect the given max records 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, if true, pass the value of EntriesResponse.getToken() in the next invocation of getEntries() as the pageToken parameter.

        See org.projectnessie.client.StreamingUtil in nessie-client.

        Throws:
        NessieNotFoundException
      • getCommitLog

        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 ..")
                                 @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
                                 @NotNull @Valid CommitLogParams params)
                          throws NessieNotFoundException
        Retrieve the commit log for a ref, potentially truncated by the backend.

        Retrieves up to maxRecords commit-log-entries starting at the HEAD of the given named reference (tag or branch) or the given Hash. The backend may respect the given max records 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, if true, pass the value of LogResponse.getToken() in the next invocation of getCommitLog() as the pageToken parameter.

        See org.projectnessie.client.StreamingUtil in nessie-client.

        Throws:
        NessieNotFoundException
      • assignTag

        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 ..")
                       @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")
                       @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,
                       NessieConflictException
        Update a tag.
        Throws:
        NessieNotFoundException
        NessieConflictException
      • deleteTag

        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 ..")
                       @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")
                       @Pattern(regexp="^[0-9a-fA-F]{16,64}$",message="Hash must consist of the hex representation of 8-32 bytes") String hash)
                throws NessieConflictException,
                       NessieNotFoundException
        Delete a tag.
        Throws:
        NessieConflictException
        NessieNotFoundException
      • assignBranch

        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 ..")
                          @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")
                          @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,
                          NessieConflictException
        Update a branch.
        Throws:
        NessieNotFoundException
        NessieConflictException
      • deleteBranch

        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 ..")
                          @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")
                          @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,
                          NessieNotFoundException
        Delete a branch.
        Throws:
        NessieConflictException
        NessieNotFoundException
      • transplantCommitsIntoBranch

        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 ..")
                                         @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")
                                         @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
                                         @Valid Transplant transplant)
                                  throws NessieNotFoundException,
                                         NessieConflictException
        cherry pick a set of commits into a branch.
        Throws:
        NessieNotFoundException
        NessieConflictException
      • mergeRefIntoBranch

        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 ..")
                                @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")
                                @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,
                                NessieConflictException
        merge mergeRef onto ref.
        Throws:
        NessieNotFoundException
        NessieConflictException
      • commitMultipleOperations

        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 ..")
                                        @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")
                                        @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
        Throws:
        NessieNotFoundException
        NessieConflictException