Class CreateThumbnailProcess

  extended by
      extended by
All Implemented Interfaces:

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 (:).
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.
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:


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(,, java.util.Collection), AssetHandler.createThumbnails(, java.util.Collection), AssetHandler.createThumbnails(, ThumbnailGenerator, ThumbnailConfig

Nested Class Summary
static class CreateThumbnailProcess.Arguments
          The available arguments to this process implementation.
Field Summary
Fields inherited from class
Constructor Summary
Method Summary
 String[] buildArguments(MetaDataMap metaData)
 void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaData)
          Executes a new Java process with the given WorkItem and WorkflowSession.
Methods inherited from class
getAssetFromPayload, getAssetHandler, getAssetManager, getMimetype, getNodeFromPayload, getResourceResolver, getValuesFromArgs, isNotReadyForProcessing, recheck, safeGetPath
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CreateThumbnailProcess()
Method Detail


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.

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
WorkflowException - Thrown in case something goes wrong during execution.


public String[] buildArguments(MetaDataMap metaData)

Copyright © 1993-2011 Day Management AG. All Rights Reserved.