Class RestTreeResource

  • All Implemented Interfaces:
    org.projectnessie.api.http.HttpTreeApi, org.projectnessie.api.TreeApi

    @RequestScoped
    public class RestTreeResource
    extends Object
    implements org.projectnessie.api.http.HttpTreeApi
    REST endpoint for the tree-API.
    • Constructor Detail

      • RestTreeResource

        public RestTreeResource()
      • RestTreeResource

        @Inject
        public RestTreeResource​(ServerConfig config,
                                org.projectnessie.versioned.VersionStore<org.projectnessie.model.Content,​org.projectnessie.model.CommitMeta,​org.projectnessie.model.Content.Type> store,
                                AccessChecker accessChecker)
    • Method Detail

      • getAllReferences

        public org.projectnessie.model.ReferencesResponse getAllReferences​(org.projectnessie.api.params.ReferencesParams params)
        Specified by:
        getAllReferences in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        getAllReferences in interface org.projectnessie.api.TreeApi
      • getDefaultBranch

        public org.projectnessie.model.Branch getDefaultBranch()
                                                        throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getDefaultBranch in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        getDefaultBranch in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • createReference

        public org.projectnessie.model.Reference createReference​(String sourceRefName,
                                                                 org.projectnessie.model.Reference reference)
                                                          throws org.projectnessie.error.NessieNotFoundException,
                                                                 org.projectnessie.error.NessieConflictException
        Specified by:
        createReference in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        createReference in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • getReferenceByName

        public org.projectnessie.model.Reference getReferenceByName​(org.projectnessie.api.params.GetReferenceParams params)
                                                             throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getReferenceByName in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        getReferenceByName in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • getEntries

        public org.projectnessie.model.EntriesResponse getEntries​(String refName,
                                                                  org.projectnessie.api.params.EntriesParams params)
                                                           throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getEntries in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        getEntries in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • getCommitLog

        public org.projectnessie.model.LogResponse getCommitLog​(String ref,
                                                                org.projectnessie.api.params.CommitLogParams params)
                                                         throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getCommitLog in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        getCommitLog in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • assignTag

        public void assignTag​(String tagName,
                              String oldHash,
                              org.projectnessie.model.Reference assignTo)
                       throws org.projectnessie.error.NessieNotFoundException,
                              org.projectnessie.error.NessieConflictException
        Specified by:
        assignTag in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        assignTag in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • deleteTag

        public void deleteTag​(String tagName,
                              String hash)
                       throws org.projectnessie.error.NessieConflictException,
                              org.projectnessie.error.NessieNotFoundException
        Specified by:
        deleteTag in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        deleteTag in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieConflictException
        org.projectnessie.error.NessieNotFoundException
      • assignBranch

        public void assignBranch​(String branchName,
                                 String oldHash,
                                 org.projectnessie.model.Reference assignTo)
                          throws org.projectnessie.error.NessieNotFoundException,
                                 org.projectnessie.error.NessieConflictException
        Specified by:
        assignBranch in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        assignBranch in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • deleteBranch

        public void deleteBranch​(String branchName,
                                 String hash)
                          throws org.projectnessie.error.NessieConflictException,
                                 org.projectnessie.error.NessieNotFoundException
        Specified by:
        deleteBranch in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        deleteBranch in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieConflictException
        org.projectnessie.error.NessieNotFoundException
      • transplantCommitsIntoBranch

        public void transplantCommitsIntoBranch​(String branchName,
                                                String hash,
                                                String message,
                                                org.projectnessie.model.Transplant transplant)
                                         throws org.projectnessie.error.NessieNotFoundException,
                                                org.projectnessie.error.NessieConflictException
        Specified by:
        transplantCommitsIntoBranch in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        transplantCommitsIntoBranch in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • mergeRefIntoBranch

        public void mergeRefIntoBranch​(String branchName,
                                       String hash,
                                       org.projectnessie.model.Merge merge)
                                throws org.projectnessie.error.NessieNotFoundException,
                                       org.projectnessie.error.NessieConflictException
        Specified by:
        mergeRefIntoBranch in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        mergeRefIntoBranch in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • commitMultipleOperations

        public org.projectnessie.model.Branch commitMultipleOperations​(String branchName,
                                                                       String hash,
                                                                       org.projectnessie.model.Operations operations)
                                                                throws org.projectnessie.error.NessieNotFoundException,
                                                                       org.projectnessie.error.NessieConflictException
        Specified by:
        commitMultipleOperations in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        commitMultipleOperations in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException