Package org.savantbuild.dep.workflow
Class Workflow
java.lang.Object
org.savantbuild.dep.workflow.Workflow
This class models a grouping of a fetch and publish workflow.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal FetchWorkflowfinal org.savantbuild.output.Outputfinal PublishWorkflow -
Constructor Summary
ConstructorsConstructorDescriptionWorkflow(FetchWorkflow fetchWorkflow, PublishWorkflow publishWorkflow, org.savantbuild.output.Output output) -
Method Summary
Modifier and TypeMethodDescriptionfetchArtifact(Artifact artifact) Fetches the artifact itself.fetchMetaData(Artifact artifact) Fetches the artifact metadata.fetchSource(Artifact artifact) Fetches the source of the artifact.
-
Field Details
-
fetchWorkflow
-
mappings
-
output
public final org.savantbuild.output.Output output -
publishWorkflow
-
rangeMappings
-
-
Constructor Details
-
Workflow
public Workflow(FetchWorkflow fetchWorkflow, PublishWorkflow publishWorkflow, org.savantbuild.output.Output output)
-
-
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.
-