Class AbstractLazyCachableRenditionProvider
- java.lang.Object
-
- org.nuxeo.ecm.platform.rendition.extension.DefaultAutomationRenditionProvider
-
- org.nuxeo.ecm.platform.rendition.lazy.AbstractLazyCachableRenditionProvider
-
- All Implemented Interfaces:
RenditionProvider
- Direct Known Subclasses:
AutomationLazyRenditionProvider
public abstract class AbstractLazyCachableRenditionProvider extends DefaultAutomationRenditionProvider
Default implementation of an asynchronousRenditionProvider
- Since:
- 7.2
- Author:
- Tiry
-
-
Field Summary
Fields Modifier and Type Field Description static String
CACHE_NAME
protected static org.apache.logging.log4j.Logger
log
static String
SOURCE_DOCUMENT_MODIFICATION_DATE_KEY
-
Fields inherited from class org.nuxeo.ecm.platform.rendition.extension.DefaultAutomationRenditionProvider
VARIANT_POLICY_USER
-
-
Constructor Summary
Constructors Constructor Description AbstractLazyCachableRenditionProvider()
-
Method Summary
-
Methods inherited from class org.nuxeo.ecm.platform.rendition.extension.DefaultAutomationRenditionProvider
getVariant, isAvailable
-
-
-
-
Field Detail
-
SOURCE_DOCUMENT_MODIFICATION_DATE_KEY
public static final String SOURCE_DOCUMENT_MODIFICATION_DATE_KEY
- See Also:
- Constant Field Values
-
CACHE_NAME
public static final String CACHE_NAME
- See Also:
- Constant Field Values
-
log
protected static org.apache.logging.log4j.Logger log
-
-
Method Detail
-
render
public List<Blob> render(DocumentModel doc, RenditionDefinition definition)
Description copied from interface:RenditionProvider
Generate the rendition Blobs for a givenRenditionDefinition
. Return is a List of Blob for bigger flexibility (typically HTML rendition with resources)- Specified by:
render
in interfaceRenditionProvider
- Overrides:
render
in classDefaultAutomationRenditionProvider
- Parameters:
doc
- the targetDocumentModel
definition
- theRenditionDefinition
to use- Returns:
- The list of Blobs
-
buildRenditionKey
public String buildRenditionKey(DocumentModel doc, RenditionDefinition def)
-
getSourceDocumentModificationDate
public String getSourceDocumentModificationDate(DocumentModel doc, RenditionDefinition definition)
-
toHexString
protected String toHexString(byte[] data)
-
getTransientStore
protected TransientStore getTransientStore()
-
handleNewRendition
protected List<Blob> handleNewRendition(String key, DocumentModel doc, RenditionDefinition definition, String sourceDocumentModificationDate)
-
handleCompletedRendition
protected void handleCompletedRendition(String key, DocumentModel doc, RenditionDefinition definition, String sourceDocumentModificationDate, String tsSourceDocumentModificationDate, List<Blob> blobs)
-
handleIncompleteRendition
protected void handleIncompleteRendition(String key, DocumentModel doc, RenditionDefinition definition, String sourceDocumentModificationDate, String tsSourceDocumentModificationDate)
-
getRenditionWork
protected abstract Work getRenditionWork(String key, DocumentModel doc, RenditionDefinition def)
Return theWork
that will compute theRendition
.AbstractRenditionBuilderWork
can be used as a base class- Parameters:
key
- the key used to renditiondoc
- the targetDocumentModel
def
- theRenditionDefinition
-
-