Package org.nuxeo.ecm.blob.s3
Class S3BlobProvider
- java.lang.Object
-
- org.nuxeo.ecm.core.blob.AbstractBlobProvider
-
- org.nuxeo.ecm.core.blob.BlobStoreBlobProvider
-
- org.nuxeo.ecm.blob.s3.S3BlobProvider
-
- All Implemented Interfaces:
S3ManagedTransfer,BlobProvider
public class S3BlobProvider extends BlobStoreBlobProvider implements S3ManagedTransfer
Blob provider that stores files in S3.This blob provider supports transactional record mode.
- Since:
- 11.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.ecm.core.blob.BlobStoreBlobProvider
BlobStoreBlobProvider.AutoDeleteFileInputStream
-
-
Field Summary
Fields Modifier and Type Field Description S3BlobStoreConfigurationconfigstatic StringSTORE_SCROLL_NAME-
Fields inherited from class org.nuxeo.ecm.core.blob.BlobStoreBlobProvider
DIGEST_KEY_STRATEGY, KEY_STRATEGY_PROPERTY, MANAGED_KEY_STRATEGY, store
-
Fields inherited from class org.nuxeo.ecm.core.blob.AbstractBlobProvider
blobProviderId, properties
-
-
Constructor Summary
Constructors Constructor Description S3BlobProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAccessBucket()Checks if the bucket exists (used in health check probes).voidclose()Closes this blob provider and releases resources that may be held by it.protected BlobStoregetBlobStore(String blobProviderId, Map<String,String> properties)protected S3BlobStoreConfigurationgetConfiguration(Map<String,String> properties)protected StringgetContentDispositionHeader(Blob blob, javax.servlet.http.HttpServletRequest servletRequest)protected StringgetContentTypeHeader(Blob blob)protected StringgetDigestAlgorithm()The digest algorithm to use for the default key strategy.BlobStatusgetStatus(ManagedBlob blob)Gets the status of a blob.StringgetStoreScrollName()Gets the name of the scroll to scroll the blobs of the underlying blob store.com.amazonaws.services.s3.transfer.TransferManagergetTransferManager()Returns theTransferManager.URIgetURI(ManagedBlob blob, BlobManager.UsageHint hint, javax.servlet.http.HttpServletRequest servletRequest)Gets anURIfor the content of a managed blob.protected URIgetURICloudFront(String bucketKey, ManagedBlob blob, Date expiration, javax.servlet.http.HttpServletRequest servletRequest)protected URIgetURIS3(String bucketKey, ManagedBlob blob, Date expiration, javax.servlet.http.HttpServletRequest servletRequest)-
Methods inherited from class org.nuxeo.ecm.core.blob.BlobStoreBlobProvider
allowDirectDownload, deleteBlob, fixupDigest, getBinaryGarbageCollector, getBinaryManager, getFile, getKeyStrategy, getStream, getStream, initialize, isValidKey, readBlob, stripBlobKeyPrefix, stripBlobKeyVersionSuffix, supportsSync, updateBlob, writeBlob, writeBlob
-
Methods inherited from class org.nuxeo.ecm.core.blob.AbstractBlobProvider
allowByteRange, getProperties, hasCreateFromKeyPermission, isColdStorageMode, isRecordMode, isTransactional, isTransient, supportsUserUpdate, supportsUserUpdateDefaultFalse, supportsUserUpdateDefaultTrue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.blob.BlobProvider
canConvert, getAppLinks, getAvailableConversions, getThumbnail, isVersion, performsExternalAccessControl, readBlob
-
-
-
-
Field Detail
-
STORE_SCROLL_NAME
public static final String STORE_SCROLL_NAME
- Since:
- 2023
- See Also:
- Constant Field Values
-
config
public S3BlobStoreConfiguration config
-
-
Method Detail
-
getBlobStore
protected BlobStore getBlobStore(String blobProviderId, Map<String,String> properties) throws IOException
- Specified by:
getBlobStorein classBlobStoreBlobProvider- Throws:
IOException
-
getConfiguration
protected S3BlobStoreConfiguration getConfiguration(Map<String,String> properties) throws IOException
- Throws:
IOException
-
getTransferManager
public com.amazonaws.services.s3.transfer.TransferManager getTransferManager()
Description copied from interface:S3ManagedTransferReturns theTransferManager.- Specified by:
getTransferManagerin interfaceS3ManagedTransfer
-
close
public void close()
Description copied from interface:BlobProviderCloses this blob provider and releases resources that may be held by it.- Specified by:
closein interfaceBlobProvider
-
getDigestAlgorithm
protected String getDigestAlgorithm()
Description copied from class:BlobStoreBlobProviderThe digest algorithm to use for the default key strategy.- Specified by:
getDigestAlgorithmin classBlobStoreBlobProvider
-
canAccessBucket
public boolean canAccessBucket()
Checks if the bucket exists (used in health check probes).
-
getURI
public URI getURI(ManagedBlob blob, BlobManager.UsageHint hint, javax.servlet.http.HttpServletRequest servletRequest) throws IOException
Description copied from interface:BlobProviderGets anURIfor the content of a managed blob.- Specified by:
getURIin interfaceBlobProvider- Parameters:
blob- the managed blobhint-BlobManager.UsageHintservletRequest- the servlet request, ornull- Returns:
- the
URI, ornullif none available - Throws:
IOException
-
getURICloudFront
protected URI getURICloudFront(String bucketKey, ManagedBlob blob, Date expiration, javax.servlet.http.HttpServletRequest servletRequest) throws URISyntaxException
- Throws:
URISyntaxException
-
getURIS3
protected URI getURIS3(String bucketKey, ManagedBlob blob, Date expiration, javax.servlet.http.HttpServletRequest servletRequest) throws URISyntaxException
- Throws:
URISyntaxException
-
getContentDispositionHeader
protected String getContentDispositionHeader(Blob blob, javax.servlet.http.HttpServletRequest servletRequest)
-
getStatus
public BlobStatus getStatus(ManagedBlob blob) throws IOException
Description copied from interface:BlobProviderGets the status of a blob.- Specified by:
getStatusin interfaceBlobProvider- Parameters:
blob- the blob- Throws:
IOException
-
getStoreScrollName
public String getStoreScrollName()
Description copied from class:BlobStoreBlobProviderGets the name of the scroll to scroll the blobs of the underlying blob store.- Overrides:
getStoreScrollNamein classBlobStoreBlobProvider
-
-