Class RestV2TreeResource

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

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

      Constructors 
      Constructor Description
      RestV2TreeResource()  
      RestV2TreeResource​(org.projectnessie.services.spi.ConfigService configService, org.projectnessie.services.spi.TreeService treeService, org.projectnessie.services.spi.ContentService contentService, org.projectnessie.services.spi.DiffService diffService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.projectnessie.model.SingleReferenceResponse assignReference​(org.projectnessie.model.Reference.ReferenceType type, java.lang.String ref, org.projectnessie.model.Reference assignTo)  
      org.projectnessie.model.CommitResponse commitMultipleOperations​(java.lang.String branch, org.projectnessie.model.Operations operations)  
      org.projectnessie.model.SingleReferenceResponse createReference​(java.lang.String name, org.projectnessie.model.Reference.ReferenceType type, org.projectnessie.model.Reference reference)  
      org.projectnessie.model.SingleReferenceResponse deleteReference​(org.projectnessie.model.Reference.ReferenceType type, java.lang.String ref)  
      org.projectnessie.model.ReferencesResponse getAllReferences​(org.projectnessie.api.v2.params.ReferencesParams params)  
      org.projectnessie.model.LogResponse getCommitLog​(java.lang.String ref, org.projectnessie.api.v2.params.CommitLogParams params)  
      org.projectnessie.model.ContentResponse getContent​(org.projectnessie.model.ContentKey key, java.lang.String ref)  
      org.projectnessie.model.DiffResponse getDiff​(org.projectnessie.api.v2.params.DiffParams params)  
      org.projectnessie.model.EntriesResponse getEntries​(java.lang.String ref, org.projectnessie.api.v2.params.EntriesParams params)  
      org.projectnessie.model.GetMultipleContentsResponse getMultipleContents​(java.lang.String ref, org.projectnessie.model.GetMultipleContentsRequest request)  
      org.projectnessie.model.SingleReferenceResponse getReferenceByName​(org.projectnessie.api.v2.params.GetReferenceParams params)  
      org.projectnessie.model.GetMultipleContentsResponse getSeveralContents​(java.lang.String ref, java.util.List<java.lang.String> keys)  
      org.projectnessie.model.MergeResponse mergeRefIntoBranch​(java.lang.String branch, org.projectnessie.api.v2.params.Merge merge)  
      org.projectnessie.model.MergeResponse transplantCommitsIntoBranch​(java.lang.String branch, org.projectnessie.api.v2.params.Transplant transplant)  
      • Methods inherited from class java.lang.Object

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

      • RestV2TreeResource

        public RestV2TreeResource()
      • RestV2TreeResource

        @Inject
        @Inject
        public RestV2TreeResource​(org.projectnessie.services.spi.ConfigService configService,
                                  org.projectnessie.services.spi.TreeService treeService,
                                  org.projectnessie.services.spi.ContentService contentService,
                                  org.projectnessie.services.spi.DiffService diffService)
    • Method Detail

      • getAllReferences

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

        public org.projectnessie.model.SingleReferenceResponse createReference​(java.lang.String name,
                                                                               org.projectnessie.model.Reference.ReferenceType type,
                                                                               org.projectnessie.model.Reference reference)
                                                                        throws org.projectnessie.error.NessieNotFoundException,
                                                                               org.projectnessie.error.NessieConflictException
        Specified by:
        createReference in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        createReference in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • getReferenceByName

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

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

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

        public org.projectnessie.model.DiffResponse getDiff​(org.projectnessie.api.v2.params.DiffParams params)
                                                     throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getDiff in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        getDiff in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • assignReference

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

        public org.projectnessie.model.SingleReferenceResponse deleteReference​(org.projectnessie.model.Reference.ReferenceType type,
                                                                               java.lang.String ref)
                                                                        throws org.projectnessie.error.NessieConflictException,
                                                                               org.projectnessie.error.NessieNotFoundException
        Specified by:
        deleteReference in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        deleteReference in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieConflictException
        org.projectnessie.error.NessieNotFoundException
      • getContent

        public org.projectnessie.model.ContentResponse getContent​(org.projectnessie.model.ContentKey key,
                                                                  java.lang.String ref)
                                                           throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getContent in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        getContent in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • getSeveralContents

        public org.projectnessie.model.GetMultipleContentsResponse getSeveralContents​(java.lang.String ref,
                                                                                      java.util.List<java.lang.String> keys)
                                                                               throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getSeveralContents in interface org.projectnessie.api.v2.http.HttpTreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • getMultipleContents

        public org.projectnessie.model.GetMultipleContentsResponse getMultipleContents​(java.lang.String ref,
                                                                                       org.projectnessie.model.GetMultipleContentsRequest request)
                                                                                throws org.projectnessie.error.NessieNotFoundException
        Specified by:
        getMultipleContents in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        getMultipleContents in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
      • transplantCommitsIntoBranch

        public org.projectnessie.model.MergeResponse transplantCommitsIntoBranch​(java.lang.String branch,
                                                                                 org.projectnessie.api.v2.params.Transplant transplant)
                                                                          throws org.projectnessie.error.NessieNotFoundException,
                                                                                 org.projectnessie.error.NessieConflictException
        Specified by:
        transplantCommitsIntoBranch in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        transplantCommitsIntoBranch in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • mergeRefIntoBranch

        public org.projectnessie.model.MergeResponse mergeRefIntoBranch​(java.lang.String branch,
                                                                        org.projectnessie.api.v2.params.Merge merge)
                                                                 throws org.projectnessie.error.NessieNotFoundException,
                                                                        org.projectnessie.error.NessieConflictException
        Specified by:
        mergeRefIntoBranch in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        mergeRefIntoBranch in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException
      • commitMultipleOperations

        public org.projectnessie.model.CommitResponse commitMultipleOperations​(java.lang.String branch,
                                                                               org.projectnessie.model.Operations operations)
                                                                        throws org.projectnessie.error.NessieNotFoundException,
                                                                               org.projectnessie.error.NessieConflictException
        Specified by:
        commitMultipleOperations in interface org.projectnessie.api.v2.http.HttpTreeApi
        Specified by:
        commitMultipleOperations in interface org.projectnessie.api.v2.TreeApi
        Throws:
        org.projectnessie.error.NessieNotFoundException
        org.projectnessie.error.NessieConflictException