Package org.saidone.unrest.platform
Class GrpcVersionService
java.lang.Object
org.saidone.unrest.api.VersionServiceGrpc.VersionServiceImplBase
org.saidone.unrest.platform.GrpcVersionService
- All Implemented Interfaces:
io.grpc.BindableService,org.saidone.unrest.api.VersionServiceGrpc.AsyncService
public final class GrpcVersionService
extends org.saidone.unrest.api.VersionServiceGrpc.VersionServiceImplBase
Exposes Alfresco document version histories through gRPC.
Each history entry contains its version label, kind, modification metadata and frozen node snapshot. The
frozen node reference can be passed to GrpcContentService.getReader(org.saidone.unrest.api.GetContentRequest, io.grpc.stub.StreamObserver<org.saidone.unrest.api.GetContentResponse>) or GrpcContentService.downloadContent(org.saidone.unrest.api.DownloadContentRequest, io.grpc.stub.StreamObserver<org.saidone.unrest.api.DownloadContentResponse>) to retrieve that version's content. Frozen snapshots omit a primary
parent because they do not belong to the live node hierarchy.
History reads run in a read-only transaction with the calling user's permissions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcVersionService(org.alfresco.service.ServiceRegistry services) Creates the adapter and its repository helpers without starting repository work. -
Method Summary
Modifier and TypeMethodDescriptionvoidgetVersionHistory(org.saidone.unrest.api.ListVersionsRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.ListVersionsResponse> observer) Reads version history in the order returned by Alfresco, normally newest first.Methods inherited from class org.saidone.unrest.api.VersionServiceGrpc.VersionServiceImplBase
bindService
-
Constructor Details
-
GrpcVersionService
public GrpcVersionService(org.alfresco.service.ServiceRegistry services) Creates the adapter and its repository helpers without starting repository work.- Parameters:
services- Alfresco service registry; repository work uses its secured services
-
-
Method Details
-
getVersionHistory
public void getVersionHistory(org.saidone.unrest.api.ListVersionsRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.ListVersionsResponse> observer) Reads version history in the order returned by Alfresco, normally newest first. Nodes without a history return an empty list. Each entry includes a frozen snapshot whose reference can be used by the content service to read that version.- Parameters:
request- document reference whose version history is requiredobserver- receives one list of version descriptions and frozen snapshots, or a gRPC error
-