com.day.cq.dam.core.process
Class CreateThumbnailProcess
java.lang.Object
com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess
com.day.cq.dam.core.process.CreateThumbnailProcess
- All Implemented Interfaces:
- WorkflowProcess
public class CreateThumbnailProcess
- extends AbstractAssetWorkflowProcess
The CreateThumbnailProcess is called in a Workflow process step.
This process will create one or more Thumbnails for the Asset to be procesed.
The Thumbnail generation is delegated to the appropriate
AssetHandler. The thumbails
Dimensions are given as the Workflow
Process arguments
Each argument is considered as one thumbnail configuration. The configuration
has to be enclosed in squared brackets ([]) The configuration consists
of a number for the width, the height in pixel and an optional flag that
indicates if the image should be centered.
These values are seperated by a colon character (:).
Dimension:
The thumbnail from an image will be created by resizeing according the
thumbnail configuration. The ascpect ratio is respected and the image will
have at most the dimension given by the configuration.
Centering:
If the center flag is set to true, the thumbnail image will have
exactly the size given by the configuraiton. If the resized image is smaller
it will be centered within the thumbnail.
Example with the following Workflow step arguments:
[70:70],
[80:100:true]
The Process creates two PNG images one of the size of 70x70 pixel and one
80x100 where the result is centred
- See Also:
AbstractAssetWorkflowProcess,
AssetHandler.createThumbnails(com.day.cq.dam.api.Asset,
com.day.cq.dam.api.Rendition, java.util.Collection),
AssetHandler.createThumbnails(com.day.cq.dam.api.Asset,
java.util.Collection),
AssetHandler.createThumbnails(com.day.cq.dam.api.Asset),
ThumbnailGenerator,
ThumbnailConfig
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateThumbnailProcess
public CreateThumbnailProcess()
execute
public void execute(WorkItem workItem,
WorkflowSession workflowSession,
MetaDataMap metaData)
throws WorkflowException
- Description copied from interface:
WorkflowProcess
- Executes a new Java process with the given
WorkItem
and WorkflowSession.
- Parameters:
workItem - The WorkItem that defines the newly
started JavaProcessNew.workflowSession - The WorkflowSession
that is used for starting the JavaProcess.metaData - Process specific arguments can be passed here
- Throws:
WorkflowException - Thrown in case something goes wrong during execution.
buildArguments
public String[] buildArguments(MetaDataMap metaData)
Copyright © 1993-2011 Day Management AG. All Rights Reserved.