run.halo.app.core.attachment.ThumbnailProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
API of halo project, connecting by other projects.
The newest version!
package run.halo.app.core.attachment;
import java.net.URI;
import java.net.URL;
import lombok.Builder;
import lombok.Data;
import org.pf4j.ExtensionPoint;
import reactor.core.publisher.Mono;
public interface ThumbnailProvider extends ExtensionPoint {
/**
* Generate thumbnail URI for given image URL and size.
*
* @param context Thumbnail context including image URI and size
* @return Generated thumbnail URI
*/
Mono generate(ThumbnailContext context);
/**
* Delete thumbnail file for given image URL.
*
* @param imageUrl original image URL
*/
Mono delete(URL imageUrl);
/**
* Whether the provider supports the given image URI.
*
* @return {@code true} if supports, {@code false} otherwise
*/
Mono supports(ThumbnailContext context);
@Data
@Builder
class ThumbnailContext {
private final URL imageUrl;
private final ThumbnailSize size;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy