Class HttpApiV1

java.lang.Object
org.projectnessie.client.rest.v1.HttpApiV1
All Implemented Interfaces:
AutoCloseable, NessieApi, NessieApiV1

public final class HttpApiV1 extends Object implements NessieApiV1
  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface NessieApi
    • unwrapClient

      public <C> Optional<C> unwrapClient(Class<C> clientType)
      Description copied from interface: NessieApi
      Returns the possibly protocol but definitely implementation specific client instance.
      Specified by:
      unwrapClient in interface NessieApi
      Type Parameters:
      C - requested/expected client type.
      Parameters:
      clientType - Expected client type.
      Returns:
      an Optional with either the client of the requested type or empty.
    • getConfig

      public org.projectnessie.model.NessieConfiguration getConfig()
      Description copied from interface: NessieApiV1
      Get the server configuration.
      Specified by:
      getConfig in interface NessieApiV1
    • getDefaultBranch

      public org.projectnessie.model.Branch getDefaultBranch() throws org.projectnessie.error.NessieNotFoundException
      Description copied from interface: NessieApiV1
      Get details for the default reference.
      Specified by:
      getDefaultBranch in interface NessieApiV1
      Throws:
      org.projectnessie.error.NessieNotFoundException
    • getContent

      public GetContentBuilder getContent()
      Specified by:
      getContent in interface NessieApiV1
    • getAllReferences

      public GetAllReferencesBuilder getAllReferences()
      Description copied from interface: NessieApiV1
      Get all references.
      Specified by:
      getAllReferences in interface NessieApiV1
    • getReference

      public GetReferenceBuilder getReference()
      Description copied from interface: NessieApiV1
      Get details of a particular ref, if it exists.
      Specified by:
      getReference in interface NessieApiV1
    • createReference

      public CreateReferenceBuilder createReference()
      Description copied from interface: NessieApiV1
      Create a new reference.
      Specified by:
      createReference in interface NessieApiV1
    • getEntries

      public GetEntriesBuilder getEntries()
      Description copied from interface: NessieApiV1
      Retrieve objects for a ref, potentially truncated by the backend.

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

      Specified by:
      getEntries in interface NessieApiV1
    • getCommitLog

      public GetCommitLogBuilder getCommitLog()
      Description copied from interface: NessieApiV1
      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). 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.isHasMore() and, if true, pass the value of LogResponse.getToken() in the next invocation of getCommitLog() as the pageToken parameter.

      Specified by:
      getCommitLog in interface NessieApiV1
    • assignTag

      public AssignTagBuilder assignTag()
      Description copied from interface: NessieApiV1
      Update a tag.
      Specified by:
      assignTag in interface NessieApiV1
    • deleteTag

      public DeleteTagBuilder deleteTag()
      Description copied from interface: NessieApiV1
      Delete a tag.
      Specified by:
      deleteTag in interface NessieApiV1
    • assignBranch

      public AssignBranchBuilder assignBranch()
      Description copied from interface: NessieApiV1
      Update a branch.
      Specified by:
      assignBranch in interface NessieApiV1
    • deleteBranch

      public DeleteBranchBuilder deleteBranch()
      Description copied from interface: NessieApiV1
      Delete a branch.
      Specified by:
      deleteBranch in interface NessieApiV1
    • transplantCommitsIntoBranch

      public TransplantCommitsBuilder transplantCommitsIntoBranch()
      Description copied from interface: NessieApiV1
      cherry pick a set of commits into a branch.
      Specified by:
      transplantCommitsIntoBranch in interface NessieApiV1
    • mergeRefIntoBranch

      public MergeReferenceBuilder mergeRefIntoBranch()
      Description copied from interface: NessieApiV1
      merge mergeRef onto ref.
      Specified by:
      mergeRefIntoBranch in interface NessieApiV1
    • commitMultipleOperations

      public CommitMultipleOperationsBuilder commitMultipleOperations()
      Specified by:
      commitMultipleOperations in interface NessieApiV1
    • getDiff

      public GetDiffBuilder getDiff()
      Description copied from interface: NessieApiV1
      Retrieve a diff between two references.
      Specified by:
      getDiff in interface NessieApiV1
    • getRefLog

      @Deprecated public GetRefLogBuilder getRefLog()
      Deprecated.
      Description copied from interface: NessieApiV1
      Retrieve the reflog from the HEAD of the RefLog resource, potentially truncated by the backend.

      The Nessie reflog in this form is deprecated, likely for removal.

      Retrieves up to maxRecords refLog-entries starting at the HEAD of the RefLog resource. 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 getRefLog() does not guarantee to return all reflog entries, because the result can be truncated by the backend.

      To implement paging, check RefLogResponse.isHasMore() and, if true, pass the value of RefLogResponse.getToken() in the next invocation of getRefLog() as the pageToken parameter.

      Specified by:
      getRefLog in interface NessieApiV1
    • getNamespace

      public GetNamespaceBuilder getNamespace()
      Description copied from interface: NessieApiV1
      Fetch a single Namespace.
      Specified by:
      getNamespace in interface NessieApiV1
    • getMultipleNamespaces

      public GetMultipleNamespacesBuilder getMultipleNamespaces()
      Description copied from interface: NessieApiV1
      Fetch one or more Namespaces based on a given prefix.
      Specified by:
      getMultipleNamespaces in interface NessieApiV1
    • createNamespace

      public CreateNamespaceBuilder createNamespace()
      Description copied from interface: NessieApiV1
      Create a single Namespace.
      Specified by:
      createNamespace in interface NessieApiV1
    • deleteNamespace

      public DeleteNamespaceBuilder deleteNamespace()
      Description copied from interface: NessieApiV1
      Delete a single Namespace.
      Specified by:
      deleteNamespace in interface NessieApiV1
    • updateProperties

      public UpdateNamespaceBuilder updateProperties()
      Description copied from interface: NessieApiV1
      Updates properties of a Namespace.
      Specified by:
      updateProperties in interface NessieApiV1