@Service @Property(name="process.label", value="Command Line") @ProviderType public class CommandLineProcess extends AbstractAssetWorkflowProcess
Asset
or part of an Asset.
Example with the following workflow step arguments:
mime:application/postscript, tn:140:100,tn:48:48, cmd:/bin/convert ${directory}/${filename} ${directory}/${basename}.jpg
The process will call /bin/convert, pass it the full path of the asset being
processed (temporarily dumped to disk), and create thumbnails of size 140x100
and 48x48 based on the output created by /bin/convert.
This will only happen for assets having the
application/postscript
mime-type, others are ignored.
Arguments:
Name | Prefix | Description | Required | Multiple | Example |
Command | cmd: | Command as executed on the consle. The command can contain varibales which are replaced before execution. The following variables are available: filename: name of the file as exported to disk. file: absolute path of the file exported. directory: absolute path of the directory the command is run and the asset is exported to. basename: the assets name on the disk without possible file-extension extension: the assets file extension. |
required | multiple | cmd:/bin/convert ${directory}/${filename} ${directory}/${basename}.jpg |
Mimetype Filter | mime: | Mimetype the Asset must have. If the Asset is of a diffrent type, this process will not be executed. | required | multiple | mime:application/postscript |
Thumbnail Specification | tn: | Dimensions of the Thumbnails to be generated from the Asset. width:height[:false] width:Number the maximal width in Pixel the Thumbnail must not exceed height:Number the maximal height in Pixel the Thumbnail must not exceed. center:Boolean, optional flag to indicate that the resulting Thumbnail must not be centered, true is default. |
multiple | tn:140:100 |
AbstractAssetWorkflowProcess
Modifier and Type | Class and Description |
---|---|
static class |
CommandLineProcess.Arguments
The available arguments to this process implementation.
|
TYPE_JCR_PATH
Constructor and Description |
---|
CommandLineProcess() |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
buildArguments(MetaDataMap metaData) |
void |
execute(WorkItem workItem,
WorkflowSession wfsession,
MetaDataMap args)
Executes a new Java process with the given
and . |
public void execute(WorkItem workItem, WorkflowSession wfsession, MetaDataMap args) throws WorkflowException
WorkflowProcess
WorkItem
and WorkflowSession
.workItem
- The WorkItem
that defines the newly
started JavaProcessNew
.wfsession
- The WorkflowSession
that is used for starting the JavaProcess
.args
- Process specific arguments can be passed hereWorkflowException
- Thrown in case something goes wrong during execution.public java.lang.String[] buildArguments(MetaDataMap metaData)
Copyright © 2010 - 2020 Adobe. All Rights Reserved