Package org.bremersee.minio
Interface MinioRepository
- All Known Implementing Classes:
MinioRepositoryImpl
public interface MinioRepository
The minio repository interface.
- Author:
- Christian Bremer
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(MinioObjectId id) Delete.List<io.minio.messages.DeleteError> deleteAll(Collection<MinioObjectId> ids) Delete all objects.booleanexists(MinioObjectId id) Checks whether an object with the specified name exists or not.default List<MinioMultipartFile> findAll()Find all objects.Find all objects.findOne(MinioObjectId id) Find one.Gets bucket.Gets minio operations.default StringgetPresignedObjectUrl(MinioObjectId id, io.minio.http.Method method) Gets presigned object url.getPresignedObjectUrl(MinioObjectId id, io.minio.http.Method method, Duration duration) Gets presigned object url.Gets region.booleanIs versioning enabled boolean.Optional<io.minio.ObjectWriteResponse> save(MinioObjectId id, org.springframework.web.multipart.MultipartFile multipartFile, DeleteMode deleteMode) Save multipart file.
-
Method Details
-
getMinioOperations
MinioOperations getMinioOperations()Gets minio operations.- Returns:
- the minio operations
-
getRegion
String getRegion()Gets region.- Returns:
- the region
-
getBucket
String getBucket()Gets bucket.- Returns:
- the bucket
-
isVersioningEnabled
boolean isVersioningEnabled()Is versioning enabled boolean.- Returns:
- the boolean
-
save
Optional<io.minio.ObjectWriteResponse> save(MinioObjectId id, @Nullable org.springframework.web.multipart.MultipartFile multipartFile, DeleteMode deleteMode) Save multipart file.- Parameters:
id- the idmultipartFile- the multipart filedeleteMode- the delete mode- Returns:
- the write response; will be empty, if the multipart file is
nullor empty
-
exists
Checks whether an object with the specified name exists or not.- Parameters:
id- the id- Returns:
trueif the object exists, otherwisefalse
-
findOne
Find one.- Parameters:
id- the id- Returns:
- the multipart file
-
findAll
Find all objects.- Returns:
- the list
-
findAll
Find all objects.- Parameters:
prefix- the prefix- Returns:
- the list
-
delete
Delete.- Parameters:
id- the id
-
deleteAll
Delete all objects.- Parameters:
ids- the IDs- Returns:
- the list
-
getPresignedObjectUrl
Gets presigned object url.- Parameters:
id- the idmethod- the method- Returns:
- the presigned object url
-
getPresignedObjectUrl
String getPresignedObjectUrl(MinioObjectId id, io.minio.http.Method method, @Nullable Duration duration) Gets presigned object url.- Parameters:
id- the idmethod- the methodduration- the duration- Returns:
- the presigned object url
-