Class URLProcess
java.lang.Object
org.savantbuild.dep.workflow.process.URLProcess
- All Implemented Interfaces:
Process
- Direct Known Subclasses:
MavenProcess
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final ItemSourcefinal org.savantbuild.output.Outputfinal Stringfinal Stringfinal String -
Constructor Summary
ConstructorsModifierConstructorDescriptionURLProcess(org.savantbuild.output.Output output, String url, String username, String password) protectedURLProcess(org.savantbuild.output.Output output, String url, String username, String password, ItemSource itemSource) -
Method Summary
Modifier and TypeMethodDescriptionfetch(ResolvableItem item, PublishWorkflow publishWorkflow) 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.publish(FetchResult fetchResult) Throws an exception.toString()
-
Field Details
-
output
public final org.savantbuild.output.Output output -
password
-
url
-
username
-
itemSource
-
-
Constructor Details
-
URLProcess
-
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:
fetchin interfaceProcess- 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
Throws an exception. This isn't supported yet.- Specified by:
publishin interfaceProcess- 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
-