Class AwsS3AssetStore
java.lang.Object
org.opencastproject.assetmanager.aws.AwsAbstractArchive
org.opencastproject.assetmanager.aws.s3.AwsS3AssetStore
- All Implemented Interfaces:
AssetStore,RemoteAssetStore,StorageUsage
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Integerstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanstatic final intstatic final intstatic final intstatic final longFields inherited from class org.opencastproject.assetmanager.aws.AwsAbstractArchive
database, regionName, storeType, workspaceFields inherited from interface org.opencastproject.assetmanager.api.storage.AssetStore
STORE_TYPE_PROPERTYFields inherited from interface org.opencastproject.assetmanager.api.storage.RemoteAssetStore
ASSET_STORE_CACHE_ROOT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Service activator, called via declarative services configuration.protected voidgetAssetObjectKey(StoragePath storagePath) Return the object key of the asset in S3getAssetRestoreStatusString(StoragePath storagePath) getAssetStorageClass(StoragePath storagePath) Return the storage class of the asset in S3protected InputStreamgetObject(AwsAssetMapping map) voidinitiateRestoreAsset(StoragePath storagePath, Integer assetRestorePeriod) modifyAssetStorageClass(StoragePath storagePath, String storageClassId) Change the storage class of the object if possiblevoidOSGi DivoidsetWorkspace(Workspace workspace) OSGi Diprotected AwsUploadOperationResultuploadObject(File origin, String objectName, Optional<MimeType> mimeType) Returns the aws s3 object id created by awsMethods inherited from class org.opencastproject.assetmanager.aws.AwsAbstractArchive
buildFilename, buildObjectName, contains, copy, delete, get, getAWSConfigKey, getFileFromWorkspace, getRegion, getStoreType, getTotalSpace, getUsableSpace, getUsedSpace, putMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencastproject.assetmanager.api.storage.AssetStore
contains, copy, delete, get, getStoreType, putMethods inherited from interface org.opencastproject.storage.StorageUsage
getTotalSpace, getUsableSpace, getUsedSpace
-
Field Details
-
AWS_S3_ENABLED
- See Also:
-
AWS_S3_ACCESS_KEY_ID_CONFIG
- See Also:
-
AWS_S3_SECRET_ACCESS_KEY_CONFIG
- See Also:
-
AWS_S3_REGION_CONFIG
- See Also:
-
AWS_S3_BUCKET_CONFIG
- See Also:
-
AWS_S3_ENDPOINT_CONFIG
- See Also:
-
AWS_S3_PATH_STYLE_CONFIG
- See Also:
-
AWS_S3_MAX_CONNECTIONS
- See Also:
-
AWS_S3_CONNECTION_TIMEOUT
- See Also:
-
AWS_S3_MAX_RETRIES
- See Also:
-
AWS_GLACIER_RESTORE_DAYS
- See Also:
-
AWS_S3_GLACIER_RESTORE_DAYS_DEFAULT
-
DEFAULT_MAX_CONNECTIONS
public static final int DEFAULT_MAX_CONNECTIONS- See Also:
-
DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_CONNECTION_TIMEOUT- See Also:
-
DEFAULT_MAX_RETRIES
public static final int DEFAULT_MAX_RETRIES- See Also:
-
DOWNLOAD_URL_EXPIRATION_MS
public static final long DOWNLOAD_URL_EXPIRATION_MS- See Also:
-
bucketCreated
protected boolean bucketCreated
-
-
Constructor Details
-
AwsS3AssetStore
public AwsS3AssetStore()
-
-
Method Details
-
setWorkspace
OSGi Di- Overrides:
setWorkspacein classAwsAbstractArchive
-
setDatabase
OSGi Di- Overrides:
setDatabasein classAwsAbstractArchive
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) throws IllegalStateException, ConfigurationException Service activator, called via declarative services configuration.- Parameters:
cc- the component context- Throws:
IllegalStateExceptionConfigurationException
-
uploadObject
protected AwsUploadOperationResult uploadObject(File origin, String objectName, Optional<MimeType> mimeType) throws AssetStoreException Returns the aws s3 object id created by aws- Specified by:
uploadObjectin classAwsAbstractArchive- Throws:
AssetStoreException
-
getAssetObjectKey
Return the object key of the asset in S3- Parameters:
storagePath- asset storage path- Throws:
AssetStoreException
-
getAssetStorageClass
Return the storage class of the asset in S3- Parameters:
storagePath- asset storage path- Throws:
AssetStoreException
-
modifyAssetStorageClass
public String modifyAssetStorageClass(StoragePath storagePath, String storageClassId) throws AssetStoreException Change the storage class of the object if possible- Parameters:
storagePath- asset storage pathstorageClassId- metadata storage class id- Throws:
AssetStoreException- See Also:
-
getObject
- Specified by:
getObjectin classAwsAbstractArchive
-
getAssetRestoreStatusString
-
initiateRestoreAsset
public void initiateRestoreAsset(StoragePath storagePath, Integer assetRestorePeriod) throws AssetStoreException - Throws:
AssetStoreException
-
deleteObject
- Specified by:
deleteObjectin classAwsAbstractArchive
-
getRestorePeriod
-