Package org.saidone.unrest.platform
Class GrpcNodeArchiveService
java.lang.Object
org.saidone.unrest.api.NodeArchiveServiceGrpc.NodeArchiveServiceImplBase
org.saidone.unrest.platform.GrpcNodeArchiveService
- All Implemented Interfaces:
io.grpc.BindableService,org.saidone.unrest.api.NodeArchiveServiceGrpc.AsyncService
public final class GrpcNodeArchiveService
extends org.saidone.unrest.api.NodeArchiveServiceGrpc.NodeArchiveServiceImplBase
Exposes the Alfresco trashcan (the archive store of workspace://SpacesStore) through gRPC.
Listing delegates to Alfresco's node archive service, which shows administrators every archived node and other users only the nodes they deleted. Purging removes archived nodes permanently through the secured node service, so the calling user's repository permissions apply. Archived nodes are addressed by their archive://SpacesStore reference or by their bare node ID; references outside the archive store are rejected so a live node can never be purged by mistake.
Reads run in read-only transactions and purges in retryable read-write transactions as the user
established by TicketInterceptor. Responses are emitted only after the transaction completes; errors
are delivered to the response observer.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGrpcNodeArchiveService(org.alfresco.service.ServiceRegistry services, org.alfresco.repo.node.archive.NodeArchiveService archive) Creates the adapter and its repository helpers without starting repository work. -
Method Summary
Modifier and TypeMethodDescriptionvoidlistArchivedNodes(org.saidone.unrest.api.ListArchivedNodesRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.ListArchivedNodesResponse> observer) Lists the archived nodes visible to the caller, most recently deleted first, optionally filtered by name.voidpurgeAllArchivedNodes(org.saidone.unrest.api.PurgeAllArchivedNodesRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.PurgeArchivedNodesResponse> observer) Permanently deletes every archived node the caller can list, in one transaction.voidpurgeArchivedNode(org.saidone.unrest.api.PurgeArchivedNodeRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.PurgeArchivedNodesResponse> observer) Permanently deletes one archived node and its archived children.Methods inherited from class org.saidone.unrest.api.NodeArchiveServiceGrpc.NodeArchiveServiceImplBase
bindService
-
Constructor Details
-
GrpcNodeArchiveService
public GrpcNodeArchiveService(org.alfresco.service.ServiceRegistry services, org.alfresco.repo.node.archive.NodeArchiveService archive) Creates the adapter and its repository helpers without starting repository work.- Parameters:
services- Alfresco service registry; repository work uses its secured servicesarchive- Alfresco node archive service
-
-
Method Details
-
listArchivedNodes
public void listArchivedNodes(org.saidone.unrest.api.ListArchivedNodesRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.ListArchivedNodesResponse> observer) Lists the archived nodes visible to the caller, most recently deleted first, optionally filtered by name. A zero page size selects 100; explicit sizes must be 1..1000. The total is -1 when unavailable.- Parameters:
request- optional name filter, non-negative skip count and optional page sizeobserver- receives one page with entries, continuation flag and total count, or a gRPC error
-
purgeArchivedNode
public void purgeArchivedNode(org.saidone.unrest.api.PurgeArchivedNodeRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.PurgeArchivedNodesResponse> observer) Permanently deletes one archived node and its archived children. The node cannot be restored afterwards.- Parameters:
request- archived node reference or bare node IDobserver- receives one response reporting the purged node, or a gRPC error
-
purgeAllArchivedNodes
public void purgeAllArchivedNodes(org.saidone.unrest.api.PurgeAllArchivedNodesRequest request, io.grpc.stub.StreamObserver<org.saidone.unrest.api.PurgeArchivedNodesResponse> observer) Permanently deletes every archived node the caller can list, in one transaction. For an administrator this empties the whole trashcan; other users purge only the nodes they deleted.- Parameters:
request- empty requestobserver- receives one response with the number of purged nodes, or a gRPC error
-