Package org.projectnessie.client.builder
Class BaseGetCommitLogBuilder<PARAMS>
- java.lang.Object
-
- org.projectnessie.client.builder.BaseGetCommitLogBuilder<PARAMS>
-
- All Implemented Interfaces:
GetCommitLogBuilder,OnReferenceBuilder<GetCommitLogBuilder>,PagingBuilder<GetCommitLogBuilder,org.projectnessie.model.LogResponse,org.projectnessie.model.LogResponse.LogEntry>,QueryBuilder<GetCommitLogBuilder>
public abstract class BaseGetCommitLogBuilder<PARAMS> extends java.lang.Object implements GetCommitLogBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected org.projectnessie.model.FetchOptionfetchOptionprotected java.lang.Stringfilterprotected java.lang.StringhashOnRefprotected java.lang.IntegermaxRecordsprotected java.lang.StringrefNameprotected java.lang.StringuntilHash
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseGetCommitLogBuilder(java.util.function.BiFunction<PARAMS,java.lang.String,PARAMS> paramsForPage)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description GetCommitLogBuilderfetch(org.projectnessie.model.FetchOption fetchOption)Will fetch additional metadata about each commit like operations in a commit and parent hash.GetCommitLogBuilderfilter(java.lang.String filter)Required: the CEL script.org.projectnessie.model.LogResponseget()Advanced usage, for manual paging: fetches a response chunk (might be one page or complete response depending on use case and parameters), but callers must implement paging on their own, if necessary.protected abstract org.projectnessie.model.LogResponseget(PARAMS p)RhashOnRef(java.lang.String hashOnRef)Optional commit ID with an optional sequence of relative lookups.GetCommitLogBuildermaxRecords(int maxRecords)Sets the maximum number of records to be returned in a single response object from thePagingBuilder.get()method.GetCommitLogBuilderpageToken(java.lang.String pageToken)Sets the page token from the previous'PagingBuilder.get()method invocation.protected abstract PARAMSparams()RrefName(java.lang.String refName)java.util.stream.Stream<org.projectnessie.model.LogResponse.LogEntry>stream()Retrieve entries/results as a JavaStream, uses automatic paging.GetCommitLogBuilderuntilHash(java.lang.String untilHash)-
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.GetCommitLogBuilder
fetch
-
Methods inherited from interface org.projectnessie.client.api.OnReferenceBuilder
hashOnRef, reference, refName
-
-
-
-
Field Detail
-
maxRecords
protected java.lang.Integer maxRecords
-
fetchOption
protected org.projectnessie.model.FetchOption fetchOption
-
filter
protected java.lang.String filter
-
untilHash
protected java.lang.String untilHash
-
refName
protected java.lang.String refName
-
hashOnRef
protected java.lang.String hashOnRef
-
-
Method Detail
-
fetch
public GetCommitLogBuilder fetch(org.projectnessie.model.FetchOption fetchOption)
Description copied from interface:GetCommitLogBuilderWill fetch additional metadata about each commit like operations in a commit and parent hash.- Specified by:
fetchin interfaceGetCommitLogBuilder- Parameters:
fetchOption- The option indicating how much info to fetch- Returns:
GetAllReferencesBuilder
-
untilHash
public GetCommitLogBuilder untilHash(java.lang.String untilHash)
- Specified by:
untilHashin interfaceGetCommitLogBuilder
-
maxRecords
public GetCommitLogBuilder maxRecords(int maxRecords)
Description copied from interface:PagingBuilderSets the maximum number of records to be returned in a single response object from thePagingBuilder.get()method.This setter reflects the OpenAPI parameter
maxRecordsin a paged request.- Specified by:
maxRecordsin interfacePagingBuilder<GetCommitLogBuilder,org.projectnessie.model.LogResponse,org.projectnessie.model.LogResponse.LogEntry>
-
pageToken
public GetCommitLogBuilder pageToken(java.lang.String pageToken)
Description copied from interface:PagingBuilderSets the page token from the previous'PagingBuilder.get()method invocation. When usingPagingBuilder.stream()methods this parameter must not be set.Only for manual paging via
PagingBuilder.get()- do not call when using any of thePagingBuilder.stream()functions.This setter reflects the OpenAPI parameter
pageTokenin a paged request.- Specified by:
pageTokenin interfacePagingBuilder<GetCommitLogBuilder,org.projectnessie.model.LogResponse,org.projectnessie.model.LogResponse.LogEntry>
-
filter
public GetCommitLogBuilder filter(java.lang.String filter)
Description copied from interface:QueryBuilderRequired: the CEL script.- Specified by:
filterin interfaceQueryBuilder<PARAMS>
-
params
protected abstract PARAMS params()
-
get
public org.projectnessie.model.LogResponse get() throws org.projectnessie.error.NessieNotFoundExceptionDescription copied from interface:PagingBuilderAdvanced usage, for manual paging: fetches a response chunk (might be one page or complete response depending on use case and parameters), but callers must implement paging on their own, if necessary. If in doubt, usePagingBuilder.stream()instead.- Specified by:
getin interfaceGetCommitLogBuilder- Specified by:
getin interfacePagingBuilder<GetCommitLogBuilder,org.projectnessie.model.LogResponse,org.projectnessie.model.LogResponse.LogEntry>- Throws:
org.projectnessie.error.NessieNotFoundException
-
get
protected abstract org.projectnessie.model.LogResponse get(PARAMS p) throws org.projectnessie.error.NessieNotFoundException
- Throws:
org.projectnessie.error.NessieNotFoundException
-
stream
public java.util.stream.Stream<org.projectnessie.model.LogResponse.LogEntry> stream() throws org.projectnessie.error.NessieNotFoundExceptionDescription copied from interface:PagingBuilderRetrieve entries/results as a JavaStream, uses automatic paging.- Specified by:
streamin interfacePagingBuilder<GetCommitLogBuilder,org.projectnessie.model.LogResponse,org.projectnessie.model.LogResponse.LogEntry>- Throws:
org.projectnessie.error.NessieNotFoundException
-
refName
public R refName(java.lang.String refName)
- Specified by:
refNamein interfaceOnReferenceBuilder<R extends OnReferenceBuilder<R>>
-
hashOnRef
public R hashOnRef(java.lang.String hashOnRef)
Description copied from interface:OnReferenceBuilderOptional commit ID with an optional sequence of relative lookups. Relative lookups can be by-timestamp, by-n-th-predecessor or by-n-th-parent.Relative lookups are only supported for REST API
v2against servers announcingNessie specification2.1.0for most functionalities.- Lookup by timestamp starts with
*followed by the numeric value of the timestamp in milliseconds since epoch. - Lookup by n-th predecessor starts with
~followed by the value for the n-th commit in the commit log. - Lookup by n-th parent starts with
^followed by either 1, referencing the direct parent, or 2, referencing the merge parent.
Valid values are:
~10-> the 10th parent from theHEAD11223344~10-> the 10th parent of the commit1122334411223344^2-> the merge parent of the commit1122334411223344~10^2-> the merge parent of the 10th parent of the commit1122334411223344~10^1-> the direct parent of the 10th parent of the commit11223344- functionally equal to11223344~1111223344*10000000000-> the commit in the commit log starting at11223344with a commit-created timestamp of 10000000000 or less.*10000000000-> the commit in the commit log starting atHEADwith a commit-created timestamp of 10000000000 or less.
- Specified by:
hashOnRefin interfaceOnReferenceBuilder<R extends OnReferenceBuilder<R>>
- Lookup by timestamp starts with
-
-