Class S3Storage
- java.lang.Object
-
- de.iip_ecosphere.platform.deviceMgt.minio.S3Storage
-
- All Implemented Interfaces:
de.iip_ecosphere.platform.deviceMgt.storage.Storage
- Direct Known Subclasses:
S3PackageStorage
public class S3Storage extends java.lang.Object implements de.iip_ecosphere.platform.deviceMgt.storage.StorageA S3Storage grants access to the storage through s3. For this purpose it uses MinioClient to communicate with the s3 storage. The storage can be set to a fixed prefix, so it is only working with a subset of the bucket.- Author:
- Dennis Pidun, University of Hildesheim
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringbucketprivate io.minio.MinioClientminioClientprivate java.lang.Stringprefix
-
Constructor Summary
Constructors Constructor Description S3Storage(java.lang.String prefix, io.minio.MinioClient minioClient, java.lang.String bucket)Creates a S3Storage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgenerateDownloadUrl(java.lang.String key)java.lang.StringgetPrefix()java.util.Set<java.lang.String>list()voidstoreFile(java.lang.String key, java.io.File file)
-
-
-
Method Detail
-
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefixin interfacede.iip_ecosphere.platform.deviceMgt.storage.Storage
-
list
public java.util.Set<java.lang.String> list()
- Specified by:
listin interfacede.iip_ecosphere.platform.deviceMgt.storage.Storage
-
generateDownloadUrl
public java.lang.String generateDownloadUrl(java.lang.String key)
- Specified by:
generateDownloadUrlin interfacede.iip_ecosphere.platform.deviceMgt.storage.Storage
-
storeFile
public void storeFile(java.lang.String key, java.io.File file) throws java.io.IOException- Specified by:
storeFilein interfacede.iip_ecosphere.platform.deviceMgt.storage.Storage- Throws:
java.io.IOException
-
-