Class BlobStoreProvider
java.lang.Object
hudson.model.AbstractDescribableImpl<BlobStoreProvider>
io.jenkins.plugins.artifact_manager_jclouds.BlobStoreProvider
- All Implemented Interfaces:
ExtensionPoint,Describable<BlobStoreProvider>,Serializable
- Direct Known Subclasses:
S3BlobStore
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
public abstract class BlobStoreProvider
extends AbstractDescribableImpl<BlobStoreProvider>
implements ExtensionPoint, Serializable
Provider for blob stores usable for artifact storage, backed by the AWS SDK.
An instance will be copied into a build record together with any fields it defines.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetBlobPath(String key, String path) abstract software.amazon.awssdk.services.s3.S3ClientCreates a client usable for working with the blob store.abstract StringA constant for the blob container name to use.abstract StringA constant for the blob path prefix to use.abstract booleanA constant to define whether we should delete artifacts or leave them to be managed on the blob service side.abstract booleanA constant to define whether we should delete stashes or leave them to be managed on the blob service side.abstract URLtoExternalURL(String container, String key, String contentType, BlobStoreProvider.HttpMethod httpMethod) Generate a URL valid for downloading OR uploading the blob for a limited period of timeabstract URIGet a provider-specific URI.
-
Constructor Details
-
BlobStoreProvider
public BlobStoreProvider()
-
-
Method Details
-
getPrefix
A constant for the blob path prefix to use. -
getContainer
A constant for the blob container name to use. -
isDeleteArtifacts
public abstract boolean isDeleteArtifacts()A constant to define whether we should delete artifacts or leave them to be managed on the blob service side. -
isDeleteStashes
public abstract boolean isDeleteStashes()A constant to define whether we should delete stashes or leave them to be managed on the blob service side. -
getClient
Creates a client usable for working with the blob store. Callers are responsible for closing it.- Throws:
IOException
-
toURI
Get a provider-specific URI.- Parameters:
container- container where this exists.key- fully qualified name relative to the container.- Returns:
- the URI
-
toExternalURL
@NonNull public abstract URL toExternalURL(@NonNull String container, @NonNull String key, @CheckForNull String contentType, @NonNull BlobStoreProvider.HttpMethod httpMethod) throws IOException Generate a URL valid for downloading OR uploading the blob for a limited period of time- Parameters:
container- container where the blob exists (or will exist).key- fully qualified name relative to the container.contentType- content type to associate with the object; only relevant for uploads, may benullotherwise.httpMethod- HTTP method to create a URL for (downloads or uploads)- Returns:
- the URL
- Throws:
IOException
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<BlobStoreProvider>
-
artifactUrls
public Map<String,URL> artifactUrls(Map<String, String> artifacts, Map<String, throws IOExceptionString> contentTypes, String key) - Throws:
IOException
-
getBlobPath
-