Class SearchServiceClient

java.lang.Object
org.saidone.unrest.client.SearchServiceClient

public class SearchServiceClient extends Object
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

    Constructors
    Constructor
    Description
    SearchServiceClient(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 Type
    Method
    Description
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SearchServiceClient

      public SearchServiceClient(io.grpc.Channel channel, 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:
      channel - shared gRPC channel; ownership remains with the caller
      tickets - shared ticket provider, normally one AuthenticationServiceClient
      deadline - 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 service
      tickets - shared ticket provider, normally one AuthenticationServiceClient
      deadline - 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 text
      language - afts or cmis; an empty value selects afts
      skipCount - non-negative number of entries to skip
      maxItems - 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 text
      language - afts or cmis; an empty value selects afts
      skipCount - non-negative number of entries to skip
      maxItems - page size in 1..1000; zero selects the server default
      sort - 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 text
      language - afts or cmis; empty selects afts
      skipCount - non-negative page offset
      maxItems - page size in 1..1000; zero selects the default
      sort - ordered AFTS sort fields; CMIS uses ORDER BY
      fields - 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