public abstract class VideoTool extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
commandLineName |
protected String |
name |
protected static String |
OUTPUT_FILE_PATH_PARAM |
protected static String |
OUTPUT_MIMETYPE_PARAM |
protected static String |
SOURCE_FILE_PATH_PARAM |
protected static String |
VIDEO_TOOLS_DIRECTORY |
Constructor and Description |
---|
VideoTool(String name,
String commandLineName) |
Modifier and Type | Method and Description |
---|---|
BlobHolder |
buildResult(String mimeType,
Map<String,String> parameters)
Returns a
BlobHolder containing the result of the command. |
void |
cleanupInputs(Map<String,String> parameters)
Removes any temporary input files that were used for command execution.
|
String |
getCommandLineName() |
String |
getName() |
static Blob |
getTemporaryBlob(String path,
String mimeType)
Gets a temporary blob for the given temporary path.
|
Map<String,String> |
setupParameters(BlobHolder input,
Map<String,Object> parameters) |
protected String commandLineName
protected static final String SOURCE_FILE_PATH_PARAM
protected static final String OUTPUT_FILE_PATH_PARAM
protected static final String OUTPUT_MIMETYPE_PARAM
protected static final String VIDEO_TOOLS_DIRECTORY
public String getCommandLineName()
public Map<String,String> setupParameters(BlobHolder input, Map<String,Object> parameters)
public void cleanupInputs(Map<String,String> parameters)
public BlobHolder buildResult(String mimeType, Map<String,String> parameters)
BlobHolder
containing the result of the command.mimeType
- the MIME typeparameters
- the parameterspublic static Blob getTemporaryBlob(String path, String mimeType)
The temporary blob is backed by a temporary file in a new location. The old file is removed.
path
- the path to a temporary filemimeType
- the blob MIME typeBlob
Copyright © 2018 Nuxeo. All rights reserved.