Class ContentItemPropertyELResolver
CoreContentItem objects to handle
lazy loading of metadata, renditions, and the document definition.
When accessing metadata, renditions or definition and they haven't
been loaded, this resolver will automatically load the required data.
Additionally provides shorthand properties for typed renditions:
thumbnailRendition, pdfRendition, structuredRendition return
the matching RenditionItem, while thumbnailRenditionData and
pdfRenditionData return the binary data as an InputStream.
structuredData returns the parsed structured rendition as a JsonNode; for email
content items it returns a navigable StructuredEmailData that exposes the email payload
fields, the content-item fields, and a cache-aware attachments list
(e.g. ${email.structuredData.from}, ${email.structuredData.attachments}).
The approach of injecting directly into the cached entity (rather than re-querying the
whole content item) is necessary for metadata and renditions, because the MyBatis entity
cache would otherwise return the same already-cached instance with the initialized flags
still false.
- Author:
- Micha Kiener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RenditionItemfindRenditionByType(String contentItemId, String renditionType) Class<?> getCommonPropertyType(org.flowable.common.engine.impl.javax.el.ELContext context, Object base) protected ObjectgetRenditionData(ContentEngineConfiguration config, CoreContentItem contentItem, RenditionItem renditionItem, String renditionType) Class<?> booleanisReadOnly(org.flowable.common.engine.impl.javax.el.ELContext context, Object base, Object property) protected voidloadMetadataIntoContentItem(ContentItemEntity contentItemEntity) protected voidloadRenditionsIntoContentItem(ContentItemEntity contentItemEntity) protected ObjectreadRenditionDataAsJsonNode(ContentEngineConfiguration config, RenditionItem renditionItem) protected StringrenditionTypeFromProperty(String propertyName) voidsetValue(org.flowable.common.engine.impl.javax.el.ELContext context, Object base, Object property, Object value) Methods inherited from class org.flowable.common.engine.impl.javax.el.ELResolver
convertToType, invoke
-
Field Details
-
METADATA_PROPERTY
- See Also:
-
RENDITIONS_PROPERTY
- See Also:
-
DEFINITION_PROPERTY
- See Also:
-
THUMBNAIL_RENDITION_PROPERTY
- See Also:
-
PDF_RENDITION_PROPERTY
- See Also:
-
STRUCTURED_RENDITION_PROPERTY
- See Also:
-
THUMBNAIL_RENDITION_DATA_PROPERTY
- See Also:
-
PDF_RENDITION_DATA_PROPERTY
- See Also:
-
STRUCTURED_RENDITION_DATA_PROPERTY
- See Also:
-
RENDITION_ITEM_PROPERTIES
-
RENDITION_DATA_PROPERTIES
-
-
Constructor Details
-
ContentItemPropertyELResolver
public ContentItemPropertyELResolver()
-
-
Method Details
-
getCommonPropertyType
-
getType
-
getValue
-
isReadOnly
-
setValue
-
loadMetadataIntoContentItem
-
loadRenditionsIntoContentItem
-
findRenditionByType
-
getRenditionData
protected Object getRenditionData(ContentEngineConfiguration config, CoreContentItem contentItem, RenditionItem renditionItem, String renditionType) -
readRenditionDataAsJsonNode
protected Object readRenditionDataAsJsonNode(ContentEngineConfiguration config, RenditionItem renditionItem) -
renditionTypeFromProperty
-