Package org.apache.sling.feature.io.artifacts.spi

# Interface ArtifactProvider

@ConsumerType public interface ArtifactProvider
The artifact provider is an extension point for providing artifacts from different sources, like for example s3.

## Method Summary

Modifier and Type
Method
Description
`URL`
`getArtifact(String url, String relativeCachePath)`
Get a local file for the artifact URL.
`String`
`getProtocol()`
The protocol name of the provider, e.g.
`void`
`init(ArtifactProviderContext context)`
Initialize the provider.
`void`
`shutdown()`
Shutdown the provider.

## Method Details

### getProtocol

String getProtocol()
The protocol name of the provider, e.g. "s3"

Returns:
  The protocol name.

### init

void init(ArtifactProviderContext context) throws IOException
Initialize the provider.

Parameters:
  `context` - The context
Throws:
  `IOException` - If the provider can't be initialized.

### shutdown

void shutdown()
Shutdown the provider.

### getArtifact

URL getArtifact(String url, String relativeCachePath)
Get a local file for the artifact URL.

Parameters:
  `url` - Artifact url
  `relativeCachePath` - A relative path that can be used as a cache path by the provider. The path does not start with a slash.
Returns:
  A local url if the artifact exists or `null`