Package org.saidone.restless.client
Class VersionServiceClient
java.lang.Object
org.saidone.restless.client.VersionServiceClient
Client of the platform's version service. Frozen version references can be read through ContentServiceClient.
Each call sends the shared provider's Alfresco ticket and a per-call deadline. Unary calls retry once after UNAUTHENTICATED if the provider supplies a different ticket. The caller owns the channel and should share one TicketProvider across service clients.
-
Constructor Summary
ConstructorsConstructorDescriptionVersionServiceClient(io.grpc.Channel channel, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline.VersionServiceClient(org.saidone.restless.api.VersionServiceGrpc.VersionServiceBlockingStub stub, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline. -
Method Summary
Modifier and TypeMethodDescriptionorg.saidone.restless.api.VersionInfogetVersion(org.saidone.restless.api.GetVersionRequest request) Gets a version by label within the history of the specified document.org.saidone.restless.api.ListVersionsResponsegetVersionHistory(String nodeRef) Version history of a document, newest first; empty when it is not versionable.org.saidone.restless.api.VersionPagelistVersionPage(org.saidone.restless.api.ListVersionPageRequest request) Reads one projected page of a document's version history.
-
Constructor Details
-
VersionServiceClient
Creates this service client with shared authentication and a per-call deadline.The caller retains ownership of the channel; closing an application should close its shared channel once.
- Parameters:
channel- shared gRPC channel; ownership remains with the callertickets- shared ticket provider, normally one AuthenticationServiceClientdeadline- per-call deadline applied to every RPC attempt
-
VersionServiceClient
public VersionServiceClient(org.saidone.restless.api.VersionServiceGrpc.VersionServiceBlockingStub stub, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline.The caller retains ownership of the channel; closing an application should close its shared channel once.
- Parameters:
stub- preconfigured stub for this repository servicetickets- shared ticket provider, normally one AuthenticationServiceClientdeadline- per-call deadline applied to every RPC attempt
-
-
Method Details
-
getVersionHistory
Version history of a document, newest first; empty when it is not versionable. Pass the version_ref of a version toContentServiceClient.getReader(java.lang.String, boolean, long, int)orContentServiceClient.downloadContent(java.lang.String, java.io.OutputStream)to read that version.- Parameters:
nodeRef- node reference, bare workspace ID or supported repository alias- Returns:
- the version history, empty when the node has no versions
-
getVersion
public org.saidone.restless.api.VersionInfo getVersion(org.saidone.restless.api.GetVersionRequest request) Gets a version by label within the history of the specified document. -
listVersionPage
public org.saidone.restless.api.VersionPage listVersionPage(org.saidone.restless.api.ListVersionPageRequest request) Reads one projected page of a document's version history.
-