Class HttpApiV2
- java.lang.Object
-
- org.projectnessie.client.rest.v2.HttpApiV2
-
- All Implemented Interfaces:
java.lang.AutoCloseable,NessieApi,NessieApiV1,NessieApiV2
public class HttpApiV2 extends java.lang.Object implements NessieApiV2
-
-
Constructor Summary
Constructors Constructor Description HttpApiV2(HttpClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssignBranchBuilderassignBranch()Update a branch.AssignReferenceBuilderassignReference()Update a branch or a tag (make it point to an arbitrary commit).AssignTagBuilderassignTag()Update a tag.voidclose()CommitMultipleOperationsBuildercommitMultipleOperations()CreateReferenceBuildercreateReference()Create a new reference.DeleteBranchBuilderdeleteBranch()Delete a branch.DeleteReferenceBuilderdeleteReference()Delete a branch or a tag.DeleteTagBuilderdeleteTag()Delete a tag.GetAllReferencesBuildergetAllReferences()Get all references.GetCommitLogBuildergetCommitLog()Retrieve the commit log for a ref, potentially truncated by the backend.org.projectnessie.model.NessieConfigurationgetConfig()Get the server configuration.GetContentBuildergetContent()org.projectnessie.model.BranchgetDefaultBranch()Get details for the default reference.GetDiffBuildergetDiff()Retrieve a diff between two references.GetEntriesBuildergetEntries()Retrieve objects for a ref, potentially truncated by the backend.GetReferenceBuildergetReference()Get details of a particular ref, if it exists.GetRepositoryConfigBuildergetRepositoryConfig()MergeReferenceBuildermergeRefIntoBranch()merge mergeRef onto ref.ReferenceHistoryBuilderreferenceHistory()Retrieve the recorded recent history of a reference.TransplantCommitsBuildertransplantCommitsIntoBranch()cherry pick a set of commits into a branch.UpdateRepositoryConfigBuilderupdateRepositoryConfig()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.projectnessie.client.api.NessieApiV2
createNamespace, deleteNamespace, getMultipleNamespaces, getNamespace, getRefLog, updateProperties
-
-
-
-
Constructor Detail
-
HttpApiV2
public HttpApiV2(HttpClient client)
-
-
Method Detail
-
close
public void close()
-
getConfig
public org.projectnessie.model.NessieConfiguration getConfig()
Description copied from interface:NessieApiV1Get the server configuration.- Specified by:
getConfigin interfaceNessieApiV1
-
getDefaultBranch
public org.projectnessie.model.Branch getDefaultBranch() throws org.projectnessie.error.NessieNotFoundExceptionDescription copied from interface:NessieApiV1Get details for the default reference.- Specified by:
getDefaultBranchin interfaceNessieApiV1- Throws:
org.projectnessie.error.NessieNotFoundException
-
getContent
public GetContentBuilder getContent()
- Specified by:
getContentin interfaceNessieApiV1
-
getAllReferences
public GetAllReferencesBuilder getAllReferences()
Description copied from interface:NessieApiV1Get all references.- Specified by:
getAllReferencesin interfaceNessieApiV1
-
createReference
public CreateReferenceBuilder createReference()
Description copied from interface:NessieApiV1Create a new reference.- Specified by:
createReferencein interfaceNessieApiV1
-
getReference
public GetReferenceBuilder getReference()
Description copied from interface:NessieApiV1Get details of a particular ref, if it exists.- Specified by:
getReferencein interfaceNessieApiV1
-
referenceHistory
public ReferenceHistoryBuilder referenceHistory()
Description copied from interface:NessieApiV2Retrieve the recorded recent history of a reference.A reference's history is a size and time limited record of changes of the reference's current pointer, aka HEAD. The size and time limits are configured in the Nessie server configuration.
- Specified by:
referenceHistoryin interfaceNessieApiV2
-
getEntries
public GetEntriesBuilder getEntries()
Description copied from interface:NessieApiV1Retrieve objects for a ref, potentially truncated by the backend.Retrieves up to
maxRecordsobjects for the given named reference (tag or branch). The backend may respect the givenmaxrecords 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, iftrue, pass the value ofEntriesResponse.getToken()in the next invocation ofgetEntries()as thepageTokenparameter.- Specified by:
getEntriesin interfaceNessieApiV1
-
getCommitLog
public GetCommitLogBuilder getCommitLog()
Description copied from interface:NessieApiV1Retrieve the commit log for a ref, potentially truncated by the backend.Retrieves up to
maxRecordscommit-log-entries starting at the HEAD of the given named reference (tag or branch). The backend may respect the givenmaxrecords 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, iftrue, pass the value ofLogResponse.getToken()in the next invocation ofgetCommitLog()as thepageTokenparameter.- Specified by:
getCommitLogin interfaceNessieApiV1
-
assignTag
public AssignTagBuilder assignTag()
Description copied from interface:NessieApiV2Update a tag.- Specified by:
assignTagin interfaceNessieApiV1- Specified by:
assignTagin interfaceNessieApiV2
-
deleteTag
public DeleteTagBuilder deleteTag()
Description copied from interface:NessieApiV2Delete a tag.- Specified by:
deleteTagin interfaceNessieApiV1- Specified by:
deleteTagin interfaceNessieApiV2
-
assignBranch
public AssignBranchBuilder assignBranch()
Description copied from interface:NessieApiV2Update a branch.- Specified by:
assignBranchin interfaceNessieApiV1- Specified by:
assignBranchin interfaceNessieApiV2
-
deleteBranch
public DeleteBranchBuilder deleteBranch()
Description copied from interface:NessieApiV2Delete a branch.- Specified by:
deleteBranchin interfaceNessieApiV1- Specified by:
deleteBranchin interfaceNessieApiV2
-
assignReference
public AssignReferenceBuilder assignReference()
Description copied from interface:NessieApiV2Update a branch or a tag (make it point to an arbitrary commit).- Specified by:
assignReferencein interfaceNessieApiV2
-
deleteReference
public DeleteReferenceBuilder deleteReference()
Description copied from interface:NessieApiV2Delete a branch or a tag.- Specified by:
deleteReferencein interfaceNessieApiV2
-
transplantCommitsIntoBranch
public TransplantCommitsBuilder transplantCommitsIntoBranch()
Description copied from interface:NessieApiV1cherry pick a set of commits into a branch.- Specified by:
transplantCommitsIntoBranchin interfaceNessieApiV1
-
mergeRefIntoBranch
public MergeReferenceBuilder mergeRefIntoBranch()
Description copied from interface:NessieApiV1merge mergeRef onto ref.- Specified by:
mergeRefIntoBranchin interfaceNessieApiV1
-
commitMultipleOperations
public CommitMultipleOperationsBuilder commitMultipleOperations()
- Specified by:
commitMultipleOperationsin interfaceNessieApiV1
-
getDiff
public GetDiffBuilder getDiff()
Description copied from interface:NessieApiV1Retrieve a diff between two references.- Specified by:
getDiffin interfaceNessieApiV1
-
getRepositoryConfig
public GetRepositoryConfigBuilder getRepositoryConfig()
- Specified by:
getRepositoryConfigin interfaceNessieApiV2
-
updateRepositoryConfig
public UpdateRepositoryConfigBuilder updateRepositoryConfig()
- Specified by:
updateRepositoryConfigin interfaceNessieApiV2
-
-