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)
|
protected abstract boolean |
perUserRendition()
Define if rendition caching key should include the user login
|
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()
protected abstract boolean perUserRendition()
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 useprotected 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 © 2015 Nuxeo SA. All rights reserved.