Class RestTreeResource

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

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

      Constructors 
      Constructor Description
      RestTreeResource()  
      RestTreeResource​(org.projectnessie.services.config.ServerConfig config, org.projectnessie.versioned.VersionStore<org.projectnessie.model.Content,​org.projectnessie.model.CommitMeta,​org.projectnessie.model.Content.Type> store, org.projectnessie.services.authz.Authorizer authorizer)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void assignReference​(org.projectnessie.model.Reference.ReferenceType referenceType, java.lang.String referenceName, java.lang.String expectedHash, org.projectnessie.model.Reference assignTo)  
      org.projectnessie.model.Branch commitMultipleOperations​(java.lang.String branchName, java.lang.String expectedHash, org.projectnessie.model.Operations operations)  
      org.projectnessie.model.Reference createReference​(java.lang.String sourceRefName, org.projectnessie.model.Reference reference)  
      void deleteReference​(org.projectnessie.model.Reference.ReferenceType referenceType, java.lang.String referenceName, java.lang.String expectedHash)  
      org.projectnessie.model.ReferencesResponse getAllReferences​(org.projectnessie.api.params.ReferencesParams params)  
      org.projectnessie.model.LogResponse getCommitLog​(java.lang.String ref, org.projectnessie.api.params.CommitLogParams params)  
      org.projectnessie.model.Branch getDefaultBranch()  
      org.projectnessie.model.EntriesResponse getEntries​(java.lang.String refName, org.projectnessie.api.params.EntriesParams params)  
      org.projectnessie.model.Reference getReferenceByName​(org.projectnessie.api.params.GetReferenceParams params)  
      org.projectnessie.model.MergeResponse mergeRefIntoBranch​(java.lang.String branchName, java.lang.String expectedHash, org.projectnessie.model.Merge merge)  
      org.projectnessie.model.MergeResponse transplantCommitsIntoBranch​(java.lang.String branchName, java.lang.String expectedHash, java.lang.String message, org.projectnessie.model.Transplant transplant)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RestTreeResource

        public RestTreeResource()
      • RestTreeResource

        @Inject
        public RestTreeResource​(org.projectnessie.services.config.ServerConfig config,
                                org.projectnessie.versioned.VersionStore<org.projectnessie.model.Content,​org.projectnessie.model.CommitMeta,​org.projectnessie.model.Content.Type> store,
                                org.projectnessie.services.authz.Authorizer authorizer)
    • 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​(java.lang.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​(java.lang.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​(java.lang.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
      • assignReference

        public void assignReference​(org.projectnessie.model.Reference.ReferenceType referenceType,
                                    java.lang.String referenceName,
                                    java.lang.String expectedHash,
                                    org.projectnessie.model.Reference assignTo)
                             throws org.projectnessie.error.NessieNotFoundException,
                                    org.projectnessie.error.NessieConflictException
        Specified by:
        assignReference in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        assignReference in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • deleteReference

        public void deleteReference​(org.projectnessie.model.Reference.ReferenceType referenceType,
                                    java.lang.String referenceName,
                                    java.lang.String expectedHash)
                             throws org.projectnessie.error.NessieConflictException,
                                    org.projectnessie.error.NessieNotFoundException
        Specified by:
        deleteReference in interface org.projectnessie.api.http.HttpTreeApi
        Specified by:
        deleteReference in interface org.projectnessie.api.TreeApi
        Throws:
        org.projectnessie.error.NessieConflictException
        org.projectnessie.error.NessieNotFoundException
      • transplantCommitsIntoBranch

        public org.projectnessie.model.MergeResponse transplantCommitsIntoBranch​(java.lang.String branchName,
                                                                                 java.lang.String expectedHash,
                                                                                 java.lang.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 org.projectnessie.model.MergeResponse mergeRefIntoBranch​(java.lang.String branchName,
                                                                        java.lang.String expectedHash,
                                                                        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​(java.lang.String branchName,
                                                                       java.lang.String expectedHash,
                                                                       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