public class ThumbnailRenditionConvertor extends Object
thumbnail definition
and
transformationOptions
(thumbnail-specific
classes) to rendition-specific parameters and vice versa.
The Thumbnail Service exposes parameters as simple data types on its various method
signatures. See for example ThumbnailDefinition.createThumbnail(...) or updateThumbnail(...).
The RenditionService replaces this approach with one based on the ActionService where
parameters are added as a Map on the Action/RenditionDefinition object.ThumbnailService.createThumbnail(org.alfresco.service.cmr.repository.NodeRef, QName, String, TransformationOptions, String)
,
ThumbnailService.createThumbnail(org.alfresco.service.cmr.repository.NodeRef, QName, String, TransformationOptions, String, ThumbnailParentAssociationDetails)
,
ThumbnailService.updateThumbnail(org.alfresco.service.cmr.repository.NodeRef, TransformationOptions)
,
RenditionDefinition
Constructor and Description |
---|
ThumbnailRenditionConvertor() |
Modifier and Type | Method and Description |
---|---|
ThumbnailDefinition |
convert(RenditionDefinition renditionDefinition) |
RenditionDefinition |
convert(ThumbnailDefinition thumbnailDefinition,
ThumbnailParentAssociationDetails assocDetails)
Given the specified
thumbnailDefinition and
assocDetails ,
create and return an equivalent RenditionDefinition object. |
Map<String,Serializable> |
convert(TransformationOptions transformationOptions,
ThumbnailParentAssociationDetails assocDetails)
Given the specified
transformationOptions and
assocDetails ,
create and return a parameter Map which contains the equivalent RenditionDefinition
configuration. |
void |
setRenditionService(RenditionService renditionService) |
public void setRenditionService(RenditionService renditionService)
public RenditionDefinition convert(ThumbnailDefinition thumbnailDefinition, ThumbnailParentAssociationDetails assocDetails)
thumbnailDefinition
and
assocDetails
,
create and return an equivalent RenditionDefinition
object.thumbnailDefinition
- ThumbnailDefinitionassocDetails
- ThumbnailParentAssociationDetailspublic Map<String,Serializable> convert(TransformationOptions transformationOptions, ThumbnailParentAssociationDetails assocDetails)
transformationOptions
and
assocDetails
,
create and return a parameter Map which contains the equivalent RenditionDefinition
configuration.transformationOptions
- TransformationOptionsassocDetails
- ThumbnailParentAssociationDetailspublic ThumbnailDefinition convert(RenditionDefinition renditionDefinition)
Copyright © 2005–2017 Alfresco Software. All rights reserved.