Package com.day.cq.dam.core.process
Class CreateWebEnabledImageProcess
- java.lang.Object
-
- com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess
-
- com.day.cq.dam.core.process.CreateWebEnabledImageProcess
-
- All Implemented Interfaces:
WorkflowProcess
@Service @Property(name="process.label", value="Create Web Enabled Image") public class CreateWebEnabledImageProcess extends AbstractAssetWorkflowProcessTheCreateWebEnabledImageProcessis called in a WorkflowProcessstep. This Process creates, if possible, a web enabled representation from theAsset.
The Format of the webenabled image, can be set by arguments to theProcess
Process is memory aware. If the required memory is not available, image creatation is deferred or cancelled if the memory requirement can't be sattisfied within a fixed amount of trails.Example with the following workflow step arguments:
dimension:500:100, quality:60The Process create a PNG Image of the size of 500x100 Pixels. The Quality will be set to 60%.
Arguments:
Prefix Description Default Multiple Example dimension: Amount in pixels given in the following format widht:hight.
Image will be risized to have at most this dimension, keeping aspect ratio1000:1000 dimension:400:300 quality: Quality as percentage from optimal. This depends on the mimetype of the resulting image. For Gifs this reduces the amount of colors, for Jpgs this sets the compression rate, etc. 60 quality:90 skip: Set the mimetypes of Assets that should not be processed mulitple skip:application/pdf, skip:image/tiff mimetype: Set the mimetype of the Image to create image/png mimetype:image/jpg keepFormatList: Commas epareted list of mimetypes that can be taken webinabled image image/pjpeg, image/jpeg, image/jpg, image/gif, image/png, image/x-png keepFormatList:image/gif,image/png,image/x-png - See Also:
AbstractAssetWorkflowProcess
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateWebEnabledImageProcess.ArgumentsEnum mixing old and new metadata argument names.static classCreateWebEnabledImageProcess.ConfigThe parsed configuration for this wf process
-
Field Summary
-
Fields inherited from class com.day.cq.dam.commons.process.AbstractAssetWorkflowProcess
TYPE_JCR_PATH
-
-
Constructor Summary
Constructors Constructor Description CreateWebEnabledImageProcess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateWebEnabledImage(WorkItem workItem, CreateWebEnabledImageProcess.Config config, Asset asset, RenditionMaker renditionMaker)voidexecute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaData)Executes a new Java process with the givenandWorkItem.WorkflowSessionCreateWebEnabledImageProcess.ConfigparseConfig(MetaDataMap metaData)
-
-
-
Method Detail
-
createWebEnabledImage
public void createWebEnabledImage(WorkItem workItem, CreateWebEnabledImageProcess.Config config, Asset asset, RenditionMaker renditionMaker) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
execute
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaData) throws WorkflowException
Description copied from interface:WorkflowProcessExecutes a new Java process with the givenandWorkItem.WorkflowSession- Parameters:
workItem- Thethat defines the newly startedWorkItemJavaProcessNew.workflowSession- Thethat is used for starting theWorkflowSessionJavaProcess.metaData- Process specific arguments can be passed here- Throws:
WorkflowException- Thrown in case something goes wrong during execution.
-
parseConfig
public CreateWebEnabledImageProcess.Config parseConfig(MetaDataMap metaData)
-
-