Class MinIoStorageService
- java.lang.Object
-
- com.netgrif.application.engine.files.minio.MinIoStorageService
-
- All Implemented Interfaces:
IStorageService
@Service @ConditionalOnProperty(value="nae.storage.minio.enabled", havingValue="true") public class MinIoStorageService extends java.lang.Object implements IStorageService
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMINIO_TYPE
-
Constructor Summary
Constructors Constructor Description MinIoStorageService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.minio.MinioClientclient(java.lang.String host)StoragecreateStorage(Data data)voiddelete(StorageField<?> field, java.lang.String path)java.io.InputStreamget(StorageField<?> field, java.lang.String path)static java.lang.StringgetBucketOrDefault(java.lang.String bucket)java.lang.StringgetPath(java.lang.String caseId, java.lang.String fieldId, java.lang.String name)java.lang.StringgetPreviewPath(java.lang.String caseId, java.lang.String fieldId, java.lang.String name)java.lang.StringgetType()booleansave(StorageField<?> field, java.lang.String path, java.io.InputStream stream)booleansave(StorageField<?> field, java.lang.String path, org.springframework.web.multipart.MultipartFile file)voidsetProperties(MinIoProperties properties)
-
-
-
Field Detail
-
MINIO_TYPE
public static final java.lang.String MINIO_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setProperties
@Autowired public void setProperties(MinIoProperties properties)
-
getType
public java.lang.String getType()
- Specified by:
getTypein interfaceIStorageService
-
createStorage
public Storage createStorage(Data data)
- Specified by:
createStoragein interfaceIStorageService
-
get
public java.io.InputStream get(StorageField<?> field, java.lang.String path) throws BadRequestException, ServiceErrorException, java.io.FileNotFoundException
- Specified by:
getin interfaceIStorageService- Throws:
BadRequestExceptionServiceErrorExceptionjava.io.FileNotFoundException
-
save
public boolean save(StorageField<?> field, java.lang.String path, org.springframework.web.multipart.MultipartFile file) throws StorageException
- Specified by:
savein interfaceIStorageService- Throws:
StorageException
-
save
public boolean save(StorageField<?> field, java.lang.String path, java.io.InputStream stream) throws StorageException
- Specified by:
savein interfaceIStorageService- Throws:
StorageException
-
delete
public void delete(StorageField<?> field, java.lang.String path) throws StorageException
- Specified by:
deletein interfaceIStorageService- Throws:
StorageException
-
getPreviewPath
public java.lang.String getPreviewPath(java.lang.String caseId, java.lang.String fieldId, java.lang.String name)- Specified by:
getPreviewPathin interfaceIStorageService
-
getPath
public java.lang.String getPath(java.lang.String caseId, java.lang.String fieldId, java.lang.String name)- Specified by:
getPathin interfaceIStorageService
-
getBucketOrDefault
public static java.lang.String getBucketOrDefault(java.lang.String bucket)
-
client
protected io.minio.MinioClient client(java.lang.String host)
-
-