Package org.saidone.unrest.client
Class SearchServiceClient
java.lang.Object
org.saidone.unrest.client.SearchServiceClient
Client of the platform's search service, supporting AFTS, CMIS, pagination and ordered AFTS sort fields.
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
ConstructorsConstructorDescriptionSearchServiceClient(io.grpc.Channel channel, TicketProvider tickets, Duration deadline) Creates this service client with shared authentication and a per-call deadline.SearchServiceClient(org.saidone.unrest.api.SearchServiceGrpc.SearchServiceBlockingStub 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.SearchResponseRuns an AFTS or CMIS query returning name, type, properties and node_ref.org.saidone.unrest.api.SearchResponsequery(String query, String language, int skipCount, int maxItems, List<org.saidone.unrest.api.SortField> sort) Runs an AFTS or CMIS query returning name, type, properties and node_ref.org.saidone.unrest.api.SearchResponsequery(String query, String language, int skipCount, int maxItems, List<org.saidone.unrest.api.SortField> sort, com.google.protobuf.FieldMask fields) Queries projected nodes; existing overloads select name, type and properties by default.
-
Constructor Details
-
SearchServiceClient
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
-
SearchServiceClient
public SearchServiceClient(org.saidone.unrest.api.SearchServiceGrpc.SearchServiceBlockingStub 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
-
query
public org.saidone.unrest.api.SearchResponse query(String query, String language, int skipCount, int maxItems) Runs an AFTS or CMIS query returning name, type, properties and node_ref. Use the fields overload with * for complete snapshots.- Parameters:
query- repository query textlanguage- afts or cmis; an empty value selects aftsskipCount- 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
-
query
public org.saidone.unrest.api.SearchResponse query(String query, String language, int skipCount, int maxItems, List<org.saidone.unrest.api.SortField> sort) Runs an AFTS or CMIS query returning name, type, properties and node_ref. Use the fields overload with * for complete snapshots.- Parameters:
query- repository query textlanguage- afts or cmis; an empty value selects aftsskipCount- non-negative number of entries to skipmaxItems- page size in 1..1000; zero selects the server defaultsort- ordered AFTS sort fields; CMIS queries use ORDER BY instead- Returns:
- the result page, total count and continuation flag
-
query
public org.saidone.unrest.api.SearchResponse query(String query, String language, int skipCount, int maxItems, List<org.saidone.unrest.api.SortField> sort, com.google.protobuf.FieldMask fields) Queries projected nodes; existing overloads select name, type and properties by default. Selection does not change permission filtering, sorting or totals. Older servers ignore the selection and return full nodes.- Parameters:
query- repository query textlanguage- afts or cmis; empty selects aftsskipCount- non-negative page offsetmaxItems- page size in 1..1000; zero selects the defaultsort- ordered AFTS sort fields; CMIS uses ORDER BYfields- Node field paths; empty selects node_ref only, a single * selects the complete node- Returns:
- the page with selected fields; node_ref is always included
-