Class VersionServiceClient

java.lang.Object
org.saidone.restless.client.VersionServiceClient

public class VersionServiceClient extends Object
Client of the platform's version service. Frozen version references can be read through ContentServiceClient.

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
    VersionServiceClient(io.grpc.Channel channel, TicketProvider tickets, Duration deadline)
    Creates this service client with shared authentication and a per-call deadline.
    VersionServiceClient(org.saidone.restless.api.VersionServiceGrpc.VersionServiceBlockingStub 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.restless.api.VersionInfo
    getVersion(org.saidone.restless.api.GetVersionRequest request)
    Gets a version by label within the history of the specified document.
    org.saidone.restless.api.ListVersionsResponse
    Version history of a document, newest first; empty when it is not versionable.
    org.saidone.restless.api.VersionPage
    listVersionPage(org.saidone.restless.api.ListVersionPageRequest request)
    Reads one projected page of a document's version history.

    Methods inherited from class java.lang.Object

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

    • VersionServiceClient

      public VersionServiceClient(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
    • VersionServiceClient

      public VersionServiceClient(org.saidone.restless.api.VersionServiceGrpc.VersionServiceBlockingStub 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

    • getVersionHistory

      public org.saidone.restless.api.ListVersionsResponse getVersionHistory(String nodeRef)
      Version history of a document, newest first; empty when it is not versionable. Pass the version_ref of a version to ContentServiceClient.getReader(java.lang.String, boolean, long, int) or ContentServiceClient.downloadContent(java.lang.String, java.io.OutputStream) to read that version.
      Parameters:
      nodeRef - node reference, bare workspace ID or supported repository alias
      Returns:
      the version history, empty when the node has no versions
    • getVersion

      public org.saidone.restless.api.VersionInfo getVersion(org.saidone.restless.api.GetVersionRequest request)
      Gets a version by label within the history of the specified document.
    • listVersionPage

      public org.saidone.restless.api.VersionPage listVersionPage(org.saidone.restless.api.ListVersionPageRequest request)
      Reads one projected page of a document's version history.