public class ChainedConverter extends Object implements Converter
Converter
implementation that acts as a converters chain.
The chain can be:
This depends on the properties of the descriptor.
Modifier and Type | Field and Description |
---|---|
protected List<String> |
steps |
protected List<String> |
subConverters |
protected boolean |
subConvertersBased |
Constructor and Description |
---|
ChainedConverter() |
ChainedConverter(List<String> subConverters) |
Modifier and Type | Method and Description |
---|---|
BlobHolder |
convert(BlobHolder blobHolder,
Map<String,Serializable> parameters)
Main method to handle the real Conversion Job.
|
protected BlobHolder |
convertBasedOnMimeTypes(BlobHolder blobHolder,
Map<String,Serializable> parameters)
Tries to find a chain of converters that fits the mime-types chain.
|
protected BlobHolder |
convertBasedSubConverters(BlobHolder blobHolder,
Map<String,Serializable> parameters) |
List<String> |
getSteps() |
List<String> |
getSubConverters()
Returns the sub converters of this chained converter.
|
void |
init(ConverterDescriptor descriptor)
Initializes the Converter.
|
boolean |
isSubConvertersBased()
Returns true if this chained converter is sub converters based, false otherwise.
|
protected boolean subConvertersBased
protected List<String> subConverters
public ChainedConverter()
public ChainedConverter(List<String> subConverters)
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 Converter
ConversionException
protected BlobHolder convertBasedSubConverters(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
ConversionException
protected BlobHolder convertBasedOnMimeTypes(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
ConversionException
public void init(ConverterDescriptor descriptor)
Converter
This can be used to retrieve some configuration information from the XMap Descriptor.
public List<String> getSubConverters()
public boolean isSubConvertersBased()
Copyright © 2015 Nuxeo SA. All rights reserved.