Package org.saidone.unrest.client
Class NodeArchiveServiceClient
java.lang.Object
org.saidone.unrest.client.NodeArchiveServiceClient
Client of the platform's node archive service: lists and permanently purges the nodes in the trashcan.
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
ConstructorsConstructorDescriptionNodeArchiveServiceClient(io.grpc.Channel channel, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline.NodeArchiveServiceClient(org.saidone.unrest.api.NodeArchiveServiceGrpc.NodeArchiveServiceBlockingStub 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.ListArchivedNodesResponselistArchivedNodes(String filter, int skipCount, int maxItems) Lists the archived nodes visible to the caller, most recently deleted first: every node for an administrator, otherwise only the nodes the caller deleted.longPermanently deletes every archived node the caller can list: the whole trashcan for an administrator.longpurgeArchivedNode(String nodeRef) Permanently deletes one archived node; it cannot be restored afterwards.
-
Constructor Details
-
NodeArchiveServiceClient
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
-
NodeArchiveServiceClient
public NodeArchiveServiceClient(org.saidone.unrest.api.NodeArchiveServiceGrpc.NodeArchiveServiceBlockingStub 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
-
listArchivedNodes
public org.saidone.unrest.api.ListArchivedNodesResponse listArchivedNodes(String filter, int skipCount, int maxItems) Lists the archived nodes visible to the caller, most recently deleted first: every node for an administrator, otherwise only the nodes the caller deleted.- Parameters:
filter- optional name filter; empty lists every visible nodeskipCount- non-negative number of entries to skipmaxItems- page size in 1..1000; zero selects the server default- Returns:
- the result page, total count and continuation flag
-
purgeArchivedNode
Permanently deletes one archived node; it cannot be restored afterwards.- Parameters:
nodeRef- archived node reference (archive://SpacesStore/<id>) or bare node ID- Returns:
- the number of purged nodes
-
purgeAllArchivedNodes
public long purgeAllArchivedNodes()Permanently deletes every archived node the caller can list: the whole trashcan for an administrator.- Returns:
- the number of purged nodes
-