public abstract class CommandLineBasedConverter extends Object implements ExternalConverter
Converter based on CommandLineExecutorService.| Modifier and Type | Class and Description | 
|---|---|
protected class  | 
CommandLineBasedConverter.CmdReturn  | 
| Modifier and Type | Field and Description | 
|---|---|
protected static String | 
CMD_NAME_PARAMETER  | 
protected Map<String,String> | 
initParameters  | 
protected static String | 
TMP_PATH_PARAMETER  | 
| Constructor and Description | 
|---|
CommandLineBasedConverter()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected abstract BlobHolder | 
buildResult(List<String> cmdOutput,
           CmdParameters cmdParams)
Builds result from commandLine output buffer. 
 | 
BlobHolder | 
convert(BlobHolder blobHolder,
       Map<String,Serializable> parameters)
Main method to handle the real Conversion Job. 
 | 
protected CommandLineBasedConverter.CmdReturn | 
execOnBlob(String commandName,
          Map<String,Blob> blobParameters,
          Map<String,String> parameters)  | 
protected abstract Map<String,Blob> | 
getCmdBlobParameters(BlobHolder blobHolder,
                    Map<String,Serializable> parameters)
Extracts BlobParameters. 
 | 
protected abstract Map<String,String> | 
getCmdStringParameters(BlobHolder blobHolder,
                      Map<String,Serializable> parameters)
Extracts String parameters. 
 | 
protected CommandLineExecutorService | 
getCommandLineService()
Deprecated. 
 
Since 7.4. Useless. 
 | 
protected String | 
getCommandName(BlobHolder blobHolder,
              Map<String,Serializable> parameters)  | 
String | 
getTmpDirectory(Map<String,Serializable> parameters)  | 
void | 
init(ConverterDescriptor descriptor)
Initializes the Converter. 
 | 
ConverterCheckResult | 
isConverterAvailable()
Checks if the converter is available. 
 | 
protected static final String CMD_NAME_PARAMETER
protected static final String TMP_PATH_PARAMETER
protected Map<String,String> initParameters
public CommandLineBasedConverter()
@Deprecated protected CommandLineExecutorService getCommandLineService()
public String getTmpDirectory(Map<String,Serializable> parameters)
public BlobHolder convert(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
Converter
 Returned BlobHolder must implement CachableBlobHolder, otherwise result won't be cached.
convert in interface ConverterConversionExceptionprotected String getCommandName(BlobHolder blobHolder, Map<String,Serializable> parameters)
protected abstract Map<String,Blob> getCmdBlobParameters(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
ConversionExceptionprotected abstract Map<String,String> getCmdStringParameters(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
ConversionExceptionprotected abstract BlobHolder buildResult(List<String> cmdOutput, CmdParameters cmdParams) throws ConversionException
ConversionExceptionprotected CommandLineBasedConverter.CmdReturn execOnBlob(String commandName, Map<String,Blob> blobParameters, Map<String,String> parameters) throws ConversionException
ConversionExceptionpublic void init(ConverterDescriptor descriptor)
ConverterThis can be used to retrieve some configuration information from the XMap Descriptor.
public ConverterCheckResult isConverterAvailable()
ExternalConverterisConverterAvailable in interface ExternalConverterCopyright © 2019 Nuxeo. All rights reserved.