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 RenditionConverterExceptionpublic ContentRendition generateThumbnail(InputStream is) throws Exception
generateThumbnail in interface RenditionConverterExceptionpublic boolean handlesContentType(String contentType)
handlesContentType in interface RenditionConverterpublic String getPdfRenditionMimeType()
getPdfRenditionMimeType in interface RenditionConverterpublic String getThumbnailRenditionMimeType()
getThumbnailRenditionMimeType in interface RenditionConverterpublic abstract boolean isPDFRenditionSupported()
isPDFRenditionSupported in interface RenditionConverterpublic abstract boolean isThumbnailRenditionSupported()
isThumbnailRenditionSupported in interface RenditionConverterpublic abstract void addSupportedContentType(String contentType)
addSupportedContentType in interface RenditionConverterpublic abstract void setSupportedContentTypes(List<String> supportedContentTypes)
setSupportedContentTypes in interface RenditionConverterprotected abstract void createPDFRendition(InputStream is, OutputStream renditionOutputStream) throws Exception
Exceptionprotected abstract void createThumbnailRendition(InputStream is, OutputStream renditionOutputStream) throws Exception
ExceptionCopyright © 2019. All rights reserved.