Interface MinioRepository

All Known Implementing Classes:
MinioRepositoryImpl

public interface MinioRepository
The minio repository interface.
Author:
Christian Bremer
  • 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 id
      multipartFile - the multipart file
      deleteMode - the delete mode
      Returns:
      the write response; will be empty, if the multipart file is null or empty
    • exists

      boolean exists(MinioObjectId id)
      Checks whether an object with the specified name exists or not.
      Parameters:
      id - the id
      Returns:
      true if the object exists, otherwise false
    • findOne

      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(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(MinioObjectId id, io.minio.http.Method method)
      Gets presigned object url.
      Parameters:
      id - the id
      method - 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 id
      method - the method
      duration - the duration
      Returns:
      the presigned object url