Package org.bremersee.data.minio
Interface MinioRepository
-
- All Known Implementing Classes:
MinioRepositoryImpl
@Validated public interface MinioRepository
The minio repository interface.- Author:
- Christian Bremer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
delete(@NotNull MinioObjectId id)
Delete.List<io.minio.messages.DeleteError>
deleteAll(Collection<MinioObjectId> ids)
Delete all objects.boolean
exists(@NotNull MinioObjectId id)
Checks whether an object with the specified name exists or not.default List<MinioMultipartFile>
findAll()
Find all objects.List<MinioMultipartFile>
findAll(String prefix)
Find all objects.Optional<MinioMultipartFile>
findOne(@NotNull MinioObjectId id)
Find one.@NotEmpty String
getBucket()
Gets bucket.@NotNull MinioOperations
getMinioOperations()
Gets minio operations.default String
getPresignedObjectUrl(@NotNull MinioObjectId id, @NotNull io.minio.http.Method method)
Gets presigned object url.String
getPresignedObjectUrl(@NotNull MinioObjectId id, @NotNull io.minio.http.Method method, Duration duration)
Gets presigned object url.String
getRegion()
Gets region.boolean
isVersioningEnabled()
Is versioning enabled boolean.Optional<io.minio.ObjectWriteResponse>
save(@NotNull MinioObjectId id, org.springframework.web.multipart.MultipartFile multipartFile, @NotNull DeleteMode deleteMode)
Save multipart file.
-
-
-
Method Detail
-
getMinioOperations
@NotNull @NotNull MinioOperations getMinioOperations()
Gets minio operations.- Returns:
- the minio operations
-
getRegion
String getRegion()
Gets region.- Returns:
- the region
-
getBucket
@NotEmpty @NotEmpty String getBucket()
Gets bucket.- Returns:
- the bucket
-
isVersioningEnabled
boolean isVersioningEnabled()
Is versioning enabled boolean.- Returns:
- the boolean
-
save
Optional<io.minio.ObjectWriteResponse> save(@NotNull @NotNull MinioObjectId id, @Nullable org.springframework.web.multipart.MultipartFile multipartFile, @NotNull @NotNull 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
null
or empty
-
exists
boolean exists(@NotNull @NotNull MinioObjectId id)
Checks whether an object with the specified name exists or not.- Parameters:
id
- the id- Returns:
true
if the object exists, otherwisefalse
-
findOne
Optional<MinioMultipartFile> findOne(@NotNull @NotNull MinioObjectId id)
Find one.- Parameters:
id
- the id- Returns:
- the multipart file
-
findAll
default List<MinioMultipartFile> findAll()
Find all objects.- Returns:
- the list
-
findAll
List<MinioMultipartFile> findAll(String prefix)
Find all objects.- Parameters:
prefix
- the prefix- Returns:
- the list
-
delete
void delete(@NotNull @NotNull MinioObjectId id)
Delete.- Parameters:
id
- the id
-
deleteAll
List<io.minio.messages.DeleteError> deleteAll(Collection<MinioObjectId> ids)
Delete all objects.- Parameters:
ids
- the IDs- Returns:
- the list
-
getPresignedObjectUrl
default String getPresignedObjectUrl(@NotNull @NotNull MinioObjectId id, @NotNull @NotNull io.minio.http.Method method)
Gets presigned object url.- Parameters:
id
- the idmethod
- the method- Returns:
- the presigned object url
-
getPresignedObjectUrl
String getPresignedObjectUrl(@NotNull @NotNull MinioObjectId id, @NotNull @NotNull 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
-
-