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 AbstractAssetWorkflowProcess
TheCreateWebEnabledImageProcess
is called in a WorkflowProcess
step. 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:60
The 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 class
CreateWebEnabledImageProcess.Arguments
Enum mixing old and new metadata argument names.static class
CreateWebEnabledImageProcess.Config
The 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 void
createWebEnabledImage(WorkItem workItem, CreateWebEnabledImageProcess.Config config, Asset asset, RenditionMaker renditionMaker)
void
execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaData)
Executes a new Java process with the given
andWorkItem
.WorkflowSession
CreateWebEnabledImageProcess.Config
parseConfig(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:WorkflowProcess
Executes a new Java process with the given
andWorkItem
.WorkflowSession
- Parameters:
workItem
- The
that defines the newly startedWorkItem
JavaProcessNew
.workflowSession
- The
that is used for starting theWorkflowSession
JavaProcess
.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)
-
-