Class AwsAbstractArchive
java.lang.Object
org.opencastproject.assetmanager.aws.AwsAbstractArchive
- All Implemented Interfaces:
AssetStore,StorageUsage
- Direct Known Subclasses:
AwsS3AssetStore
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AwsAssetDatabaseprotected StringThe AWS regionprotected StringThe store type e.g. aws (long-term), or other implementationsprotected WorkspaceFields inherited from interface org.opencastproject.assetmanager.api.storage.AssetStore
STORE_TYPE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildFilename(StoragePath path, String ext) Builds the aws object name.buildObjectName(File origin, StoragePath storagePath) booleancontains(StoragePath path) Check if a resource exists.booleancopy(StoragePath from, StoragePath to) Copy a resource to a new location.booleandelete(DeletionSelector sel) Delete all selected resources.protected abstract voidget(StoragePath path) Get an input stream to a resource.protected StringgetAWSConfigKey(org.osgi.service.component.ComponentContext cc, String key) protected FilegetFileFromWorkspace(Source source) protected abstract InputStreamgetObject(AwsAssetMapping map) Returns the store.type propertyGets the total space of storage in BytesGets the available space of storage in Bytes This is free storage that is not reservedGets the used space of storage in Bytesvoidput(StoragePath storagePath, Source source) Add the content ofsoureunder the given path.voidOSGi DivoidsetWorkspace(Workspace workspace) OSGi Diprotected abstract AwsUploadOperationResult
-
Field Details
-
workspace
-
database
-
storeType
The store type e.g. aws (long-term), or other implementations -
regionName
The AWS region
-
-
Constructor Details
-
AwsAbstractArchive
public AwsAbstractArchive()
-
-
Method Details
-
getAWSConfigKey
-
getUsedSpace
Description copied from interface:StorageUsageGets the used space of storage in Bytes- Specified by:
getUsedSpacein interfaceStorageUsage- Returns:
- Number of used bytes in storage
-
getUsableSpace
Description copied from interface:StorageUsageGets the available space of storage in Bytes This is free storage that is not reserved- Specified by:
getUsableSpacein interfaceStorageUsage- Returns:
- Number of available bytes in storage
-
getTotalSpace
Description copied from interface:StorageUsageGets the total space of storage in Bytes- Specified by:
getTotalSpacein interfaceStorageUsage- Returns:
- Number of all bytes in storage
-
getStoreType
Description copied from interface:AssetStoreReturns the store.type property- Specified by:
getStoreTypein interfaceAssetStore- Returns:
- store type
-
getRegion
-
setWorkspace
OSGi Di -
setDatabase
OSGi Di -
copy
Description copied from interface:AssetStoreCopy a resource to a new location.- Specified by:
copyin interfaceAssetStore- Returns:
- true, if the selected resource could be found and copied
- Throws:
AssetStoreException- See Also:
-
contains
Description copied from interface:AssetStoreCheck if a resource exists.- Specified by:
containsin interfaceAssetStore- Throws:
AssetStoreException
-
getFileFromWorkspace
-
buildObjectName
-
buildFilename
Builds the aws object name. -
put
Description copied from interface:AssetStoreAdd the content ofsoureunder the given path.- Specified by:
putin interfaceAssetStore- Throws:
AssetStoreException- See Also:
-
uploadObject
protected abstract AwsUploadOperationResult uploadObject(String orgId, File origin, String objectName, Optional<MimeType> mimeType) throws AssetStoreException - Throws:
AssetStoreException
-
get
Description copied from interface:AssetStoreGet an input stream to a resource.- Specified by:
getin interfaceAssetStore- Throws:
AssetStoreException- See Also:
-
getObject
- Throws:
AssetStoreException
-
delete
Description copied from interface:AssetStoreDelete all selected resources.- Specified by:
deletein interfaceAssetStore- Returns:
- true, if the selected resources could be found and deleted
- Throws:
AssetStoreException- See Also:
-
deleteObject
- Throws:
AssetStoreException
-