Interface Process

All Known Implementing Classes:
CacheProcess, MavenProcess, SVNProcess, URLProcess

public interface Process
This interface defines a workflow process that can be used for either publishing or for fetching.
  • Method Details

    • fetch

      FetchResult fetch(ResolvableItem item, PublishWorkflow publishWorkflow) throws ProcessFailureException
      Attempts to fetch the given item. The item is normally associated with the artifact, but might be associated with a group or project. This method can use the artifact for logging or other purposes, but should use the item String for fetching only.

      If the item is found, it should be published by calling the PublishWorkflow.

      Parameters:
      item - The item being fetched. This item name should include the necessary information so that the process can locate the item.
      publishWorkflow - The PublishWorkflow that is used to store the item if it can be found.
      Returns:
      A FetchResult containing the Path to the item on the local disk and its source, or null if the item does not exist and there were no failures.
      Throws:
      ProcessFailureException - If the process failed when fetching the artifact.
    • publish

      Path publish(FetchResult fetchResult) throws ProcessFailureException
      Attempts to publish the given item. The item is normally associated with the artifact, but might be associated with a group or project. This method can use the artifact for logging or other purposes, but should use the item String for publishing only.

      If the item is published in a manner that a file can be returned, that file should be returned as it might be used to create paths or other constructs.

      Parameters:
      fetchResult - The fetch result containing the item, file, and source.
      Returns:
      The file if the publish process stored the given file locally (local cache for example). Otherwise, this should return null.
      Throws:
      ProcessFailureException - If there was any issue publishing.