Interface MinioRepository

  • All Known Implementing Classes:
    MinioRepositoryImpl

    @Validated
    public interface MinioRepository
    The minio repository interface.
    Author:
    Christian Bremer
    • 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 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​(@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, otherwise false
      • 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 id
        method - 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 id
        method - the method
        duration - the duration
        Returns:
        the presigned object url