Package org.saidone.unrest.client
Class VersionServiceClient
java.lang.Object
org.saidone.unrest.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.unrest.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.unrest.api.ListVersionsResponsegetVersionHistory(String nodeRef) Version history of a document, newest first; empty when it is not versionable.
-
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.unrest.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
-