public abstract class AbstractLazyCachableRenditionProvider extends Object implements RenditionProvider
RenditionProvider
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_NAME |
protected static org.apache.commons.logging.Log |
log |
static String |
WORKERID_KEY |
Constructor and Description |
---|
AbstractLazyCachableRenditionProvider() |
Modifier and Type | Method and Description |
---|---|
protected String |
buildRenditionKey(DocumentModel doc,
RenditionDefinition def) |
protected String |
getDigest(String key) |
protected abstract Work |
getRenditionWork(String key,
DocumentModel doc,
RenditionDefinition def)
|
String |
getVariant(DocumentModel doc,
RenditionDefinition definition)
Gets the optional
RENDITION_VARIANT_PROPERTY value for a given RenditionDefinition . |
List<Blob> |
render(DocumentModel doc,
RenditionDefinition def)
Generate the rendition Blobs for a given
RenditionDefinition . |
protected String |
toHexString(byte[] data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAvailable
public static final String WORKERID_KEY
public static final String CACHE_NAME
protected static org.apache.commons.logging.Log log
public AbstractLazyCachableRenditionProvider()
public List<Blob> render(DocumentModel doc, RenditionDefinition def)
RenditionProvider
RenditionDefinition
. Return is a List of Blob for bigger
flexibility (typically HTML rendition with resources)render
in interface RenditionProvider
doc
- the target DocumentModel
def
- the RenditionDefinition
to usepublic String getVariant(DocumentModel doc, RenditionDefinition definition)
RenditionProvider
RENDITION_VARIANT_PROPERTY
value for a given RenditionDefinition
.getVariant
in interface RenditionProvider
doc
- the target documentdefinition
- the rendition definition to useRENDITION_VARIANT_PROPERTY
value, or null
protected String buildRenditionKey(DocumentModel doc, RenditionDefinition def)
protected String toHexString(byte[] data)
protected abstract Work getRenditionWork(String key, DocumentModel doc, RenditionDefinition def)
Work
that will compute the Rendition
. AbstractRenditionBuilderWork
can be used
as a base classkey
- the key used to renditiondoc
- the target DocumentModel
def
- the RenditionDefinition
Copyright © 2017 Nuxeo. All rights reserved.