Class PublishWorkflow

java.lang.Object
org.savantbuild.dep.workflow.PublishWorkflow

public class PublishWorkflow extends Object
This is the interface that defines how artifacts are published to different locations during resolution. Publishing is the act of storing the artifact for later use. In general the publishing corresponds one-to-one with the local cache store locations that are used as part of the FetchWorkflow, but this is in no way required.
  • Field Details

  • Constructor Details

    • PublishWorkflow

      public PublishWorkflow(Process... processes)
  • Method Details

    • getProcesses

      public List<Process> getProcesses()
      Returns:
      The process list.
    • publish

      public Path publish(FetchResult fetchResult) throws ProcessFailureException
      Publishes the item using the processes in this workflow.
      Parameters:
      fetchResult - The fetch result containing the item, file, and source.
      Returns:
      A file that can be used to reference the artifact for paths and other constructs.
      Throws:
      ProcessFailureException - If the artifact could not be published for any reason.
    • publishNegative

      public void publishNegative(ResolvableItem item, ItemSource source)
      Publishes a negative file for the item. This file is empty, but signals Savant not to attempt to fetch that specific item again, since it doesn't exist.
      Parameters:
      item - The item that the negative is being published for.
      source - The source to tag the negative marker with.