Class URLProcess

java.lang.Object
org.savantbuild.dep.workflow.process.URLProcess
All Implemented Interfaces:
Process
Direct Known Subclasses:
MavenProcess

public class URLProcess extends Object implements Process
This class is a workflow process that attempts to download artifacts from the internet using the Savant scheme via HTTP.

Savant's URL scheme is

domain/group/project/version/name-version.type

  • Field Details

    • output

      public final org.savantbuild.output.Output output
    • password

      public final String password
    • url

      public final String url
    • username

      public final String username
    • itemSource

      protected final ItemSource itemSource
  • Constructor Details

    • URLProcess

      public URLProcess(org.savantbuild.output.Output output, String url, String username, String password)
    • URLProcess

      protected URLProcess(org.savantbuild.output.Output output, String url, String username, String password, ItemSource itemSource)
  • Method Details

    • fetch

      public FetchResult fetch(ResolvableItem item, PublishWorkflow publishWorkflow) throws ProcessFailureException
      Using the URL spec given, this method connects to the URL, reads the file from the URL and stores the file in the local cache store. The artifact is used to determine the local cache store directory and file name.
      Specified by:
      fetch in interface Process
      Parameters:
      item - The item to fetch.
      publishWorkflow - The publishWorkflow to publish the artifact if found.
      Returns:
      The FetchResult of the artifact after it has been published, or null if not found.
      Throws:
      ProcessFailureException - If the process failed when fetching the artifact.
    • publish

      public Path publish(FetchResult fetchResult) throws ProcessFailureException
      Throws an exception. This isn't supported yet.
      Specified by:
      publish in interface Process
      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.
    • toString

      public String toString()
      Overrides:
      toString in class Object