Class Workflow

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

public class Workflow extends Object
This class models a grouping of a fetch and publish workflow.
  • Field Details

    • fetchWorkflow

      public final FetchWorkflow fetchWorkflow
    • mappings

      public final Map<String,org.savantbuild.domain.Version> mappings
    • output

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

      public final PublishWorkflow publishWorkflow
    • rangeMappings

      public final Map<String,String> rangeMappings
  • Constructor Details

  • Method Details

    • fetchArtifact

      public Path fetchArtifact(Artifact artifact) throws ArtifactMissingException, ProcessFailureException, org.savantbuild.security.MD5Exception
      Fetches the artifact itself. Every artifact in a Savant dependency graph is required to exist. Therefore, Savant never negative caches artifact files and this method will always return the artifact file or throw an ArtifactMissingException.
      Parameters:
      artifact - The artifact to fetch.
      Returns:
      The Path of the artifact and never null.
      Throws:
      ArtifactMissingException - If the artifact could not be found.
      ProcessFailureException - If any of the processes encountered a failure while attempting to fetch the artifact.
      org.savantbuild.security.MD5Exception - If the item's MD5 file did not match the item.
    • fetchMetaData

      public ArtifactMetaData fetchMetaData(Artifact artifact) throws ArtifactMetaDataMissingException, ProcessFailureException, org.savantbuild.security.MD5Exception
      Fetches the artifact metadata. Every artifact in Savant is required to have an AMD file. Otherwise, it is considered a missing artifact entirely. Therefore, Savant never negative caches AMD files and this method will always return an AMD file or throw an ArtifactMetaDataMissingException.
      Parameters:
      artifact - The artifact to fetch the metadata for.
      Returns:
      The ArtifactMetaData object and never null.
      Throws:
      ArtifactMetaDataMissingException - If the AMD file could not be found.
      ProcessFailureException - If any of the processes encountered a failure while attempting to fetch the AMD file.
      org.savantbuild.security.MD5Exception - If the item's MD5 file did not match the item.
    • fetchSource

      public Path fetchSource(Artifact artifact) throws ProcessFailureException, org.savantbuild.security.MD5Exception
      Fetches the source of the artifact. If a source file is missing, this method stores a negative file in the cache so that an attempt to download the source file isn't made each time. This is required so that offline work can be done by only hitting the local cache of dependencies.
      Parameters:
      artifact - The artifact to fetch the source for.
      Returns:
      The Path of the source or null if it doesn't exist.
      Throws:
      ProcessFailureException - If any of the processes encountered a failure while attempting to fetch the source file.
      org.savantbuild.security.MD5Exception - If the item's MD5 file did not match the item.