Package com.flowable.rendition
Class BaseContentConverter
- java.lang.Object
-
- com.flowable.rendition.BaseContentConverter
-
- All Implemented Interfaces:
RenditionConverter
public abstract class BaseContentConverter extends Object implements RenditionConverter
- Author:
- Yvo Swillens
-
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description BaseContentConverter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
PDF_RENDITION_PREFIX
protected static final String PDF_RENDITION_PREFIX
- See Also:
- Constant Field Values
-
PDF_RENDITION_SUFFIX
protected static final String PDF_RENDITION_SUFFIX
- See Also:
- Constant Field Values
-
PDF_RENDITION_MIME_TYPE
protected static final String PDF_RENDITION_MIME_TYPE
- See Also:
- Constant Field Values
-
THUMBNAIL_RENDITION_PREFIX
protected static final String THUMBNAIL_RENDITION_PREFIX
- See Also:
- Constant Field Values
-
THUMBNAIL_RENDITION_SUFFIX
protected static final String THUMBNAIL_RENDITION_SUFFIX
- See Also:
- Constant Field Values
-
THUMBNAIL_RENDITION_MIME_TYPE
protected static final String THUMBNAIL_RENDITION_MIME_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
generatePDF
public ContentRendition generatePDF(InputStream is) throws Exception
- Specified by:
generatePDF
in interfaceRenditionConverter
- Throws:
Exception
-
generateThumbnail
public ContentRendition generateThumbnail(InputStream is) throws Exception
- Specified by:
generateThumbnail
in interfaceRenditionConverter
- Throws:
Exception
-
handlesContentType
public boolean handlesContentType(String contentType)
- Specified by:
handlesContentType
in interfaceRenditionConverter
-
getPdfRenditionMimeType
public String getPdfRenditionMimeType()
- Specified by:
getPdfRenditionMimeType
in interfaceRenditionConverter
-
getThumbnailRenditionMimeType
public String getThumbnailRenditionMimeType()
- Specified by:
getThumbnailRenditionMimeType
in interfaceRenditionConverter
-
isPDFRenditionSupported
public abstract boolean isPDFRenditionSupported()
- Specified by:
isPDFRenditionSupported
in interfaceRenditionConverter
-
isThumbnailRenditionSupported
public abstract boolean isThumbnailRenditionSupported()
- Specified by:
isThumbnailRenditionSupported
in interfaceRenditionConverter
-
addSupportedContentType
public abstract void addSupportedContentType(String contentType)
- Specified by:
addSupportedContentType
in interfaceRenditionConverter
-
setSupportedContentTypes
public abstract void setSupportedContentTypes(List<String> supportedContentTypes)
- Specified by:
setSupportedContentTypes
in interfaceRenditionConverter
-
createPDFRendition
protected abstract void createPDFRendition(InputStream is, OutputStream renditionOutputStream) throws Exception
- Throws:
Exception
-
createThumbnailRendition
protected abstract void createThumbnailRendition(InputStream is, OutputStream renditionOutputStream) throws Exception
- Throws:
Exception
-
-