public class CommandLineConverter extends CommandLineBasedConverter
 The command line to call is stored in the CommandLineName parameter.
 
 The target file name is in the targetFileName parameter. If it's null, a temporary one will be created.
 
All the converter parameters are passed to the command line.
A sample contribution using this converter:
     
       application/pdf 
       image/jpeg 
       image/png 
       image/gif 
       
         pdftoimage 
        
      
 CommandLineBasedConverter.CmdReturn| Modifier and Type | Field and Description | 
|---|---|
static String | 
OUT_DIR_PATH_KEY  | 
static List<String> | 
RESERVED_PARAMETERS  | 
static String | 
SOURCE_FILE_PATH_KEY  | 
static String | 
TARGET_FILE_NAME_KEY  | 
static String | 
TARGET_FILE_PATH_KEY  | 
CMD_NAME_PARAMETER, initParameters, TMP_PATH_PARAMETER| Constructor and Description | 
|---|
CommandLineConverter()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected BlobHolder | 
buildResult(List<String> cmdOutput,
           CmdParameters cmdParams)
Builds result from commandLine output buffer. 
 | 
protected Map<String,Blob> | 
getCmdBlobParameters(BlobHolder blobHolder,
                    Map<String,Serializable> parameters)
Extracts BlobParameters. 
 | 
protected Map<String,String> | 
getCmdStringParameters(BlobHolder blobHolder,
                      Map<String,Serializable> parameters)
Extracts String parameters. 
 | 
convert, execOnBlob, getCommandLineService, getCommandName, getTmpDirectory, init, isConverterAvailablepublic static final String SOURCE_FILE_PATH_KEY
public static final String OUT_DIR_PATH_KEY
public static final String TARGET_FILE_NAME_KEY
public static final String TARGET_FILE_PATH_KEY
public static final List<String> RESERVED_PARAMETERS
public CommandLineConverter()
protected Map<String,Blob> getCmdBlobParameters(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
CommandLineBasedConvertergetCmdBlobParameters in class CommandLineBasedConverterConversionExceptionprotected Map<String,String> getCmdStringParameters(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
CommandLineBasedConvertergetCmdStringParameters in class CommandLineBasedConverterConversionExceptionprotected BlobHolder buildResult(List<String> cmdOutput, CmdParameters cmdParams) throws ConversionException
CommandLineBasedConverterbuildResult in class CommandLineBasedConverterConversionExceptionCopyright © 2019 Nuxeo. All rights reserved.