public abstract class BaseContentConverter extends Object implements RenditionConverter
Modifier and Type | Field and Description |
---|---|
protected static String |
PDF_RENDITION_MIME_TYPE |
protected static String |
PDF_RENDITION_PREFIX |
protected static String |
PDF_RENDITION_SUFFIX |
protected static String |
THUMBNAIL_RENDITION_MIME_TYPE |
protected static String |
THUMBNAIL_RENDITION_PREFIX |
protected static String |
THUMBNAIL_RENDITION_SUFFIX |
Constructor and Description |
---|
BaseContentConverter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addSupportedContentType(String contentType) |
protected abstract void |
createPDFRendition(InputStream is,
OutputStream renditionOutputStream) |
protected abstract void |
createThumbnailRendition(InputStream is,
OutputStream renditionOutputStream) |
ContentRendition |
generatePDF(InputStream is) |
ContentRendition |
generateThumbnail(InputStream is) |
String |
getPdfRenditionMimeType() |
protected abstract List<String> |
getSupportedContentTypes() |
String |
getThumbnailRenditionMimeType() |
boolean |
handlesContentType(String contentType) |
abstract boolean |
isPDFRenditionSupported() |
abstract boolean |
isThumbnailRenditionSupported() |
abstract void |
setSupportedContentTypes(List<String> supportedContentTypes) |
protected static final String PDF_RENDITION_PREFIX
protected static final String PDF_RENDITION_SUFFIX
protected static final String PDF_RENDITION_MIME_TYPE
protected static final String THUMBNAIL_RENDITION_PREFIX
protected static final String THUMBNAIL_RENDITION_SUFFIX
protected static final String THUMBNAIL_RENDITION_MIME_TYPE
public ContentRendition generatePDF(InputStream is) throws Exception
generatePDF
in interface RenditionConverter
Exception
public ContentRendition generateThumbnail(InputStream is) throws Exception
generateThumbnail
in interface RenditionConverter
Exception
public boolean handlesContentType(String contentType)
handlesContentType
in interface RenditionConverter
public String getPdfRenditionMimeType()
getPdfRenditionMimeType
in interface RenditionConverter
public String getThumbnailRenditionMimeType()
getThumbnailRenditionMimeType
in interface RenditionConverter
public abstract boolean isPDFRenditionSupported()
isPDFRenditionSupported
in interface RenditionConverter
public abstract boolean isThumbnailRenditionSupported()
isThumbnailRenditionSupported
in interface RenditionConverter
public abstract void addSupportedContentType(String contentType)
addSupportedContentType
in interface RenditionConverter
public abstract void setSupportedContentTypes(List<String> supportedContentTypes)
setSupportedContentTypes
in interface RenditionConverter
protected abstract void createPDFRendition(InputStream is, OutputStream renditionOutputStream) throws Exception
Exception
protected abstract void createThumbnailRendition(InputStream is, OutputStream renditionOutputStream) throws Exception
Exception