Class SigningWorkflow

java.lang.Object
org.eclipse.csi.codesign.SigningWorkflow

public class SigningWorkflow extends Object
Orchestrates the full signing workflow: submit an artifact → poll until a final status is reached.

After a successful call to submitAndWait(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>, java.nio.file.Path), callers should download the signed artifact via CodesignClient.downloadSignedArtifact(SigningRequestStatus, Path).

  • Constructor Details

    • SigningWorkflow

      public SigningWorkflow(CodesignClient client, Duration pollInterval, Consumer<String> logger)
      Creates a workflow that polls indefinitely (no completion deadline).
      Parameters:
      client - the SignPath API client
      pollInterval - how often to check signing status
      logger - consumer for informational progress messages; null = silent
    • SigningWorkflow

      public SigningWorkflow(CodesignClient client, Duration pollInterval, Duration completionTimeout, Consumer<String> logger)
      Creates a workflow with an optional completion timeout.
      Parameters:
      client - the SignPath API client
      pollInterval - how often to check signing status
      completionTimeout - maximum time to wait for a final status; null = no limit
      logger - consumer for informational progress messages; null = silent
  • Method Details

    • submitAndWait

      public SigningRequestStatus submitAndWait(String projectId, String signingPolicy, String artifactConfiguration, String description, Map<String,String> parameters, Path artifactPath) throws CodesignException, IOException
      Submits an artifact for signing and polls until a final status is reached.
      Parameters:
      projectId - SignPath project slug
      signingPolicy - SignPath signing policy slug
      artifactConfiguration - optional artifact configuration slug; may be null
      description - optional signing request description; may be null
      parameters - optional custom key/value parameters; may be null
      artifactPath - path to the artifact to sign
      Returns:
      the final (terminal) signing request status
      Throws:
      CodesignException - if the API fails or the deadline is exceeded before a final status is reached
      IOException - on transport or thread-interruption errors