Class ChainedConverter
- java.lang.Object
 - 
- org.nuxeo.ecm.core.convert.extension.ChainedConverter
 
 
- 
- All Implemented Interfaces:
 Converter
public class ChainedConverter extends Object implements Converter
SpecificConverterimplementation that acts as a converters chain.The chain can be:
- a chain of mime-types
 - a chain of converter names
 
This depends on the properties of the descriptor.
- Author:
 - tiry
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected List<String>stepsprotected List<String>subConvertersprotected booleansubConvertersBased 
- 
Constructor Summary
Constructors Constructor Description ChainedConverter()ChainedConverter(List<String> subConverters) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BlobHolderconvert(BlobHolder blobHolder, Map<String,Serializable> parameters)Main method to handle the real Conversion Job.protected BlobHolderconvertBasedOnMimeTypes(BlobHolder blobHolder, Map<String,Serializable> parameters)Tries to find a chain of converters that fits the mime-types chain.protected BlobHolderconvertBasedSubConverters(BlobHolder blobHolder, Map<String,Serializable> parameters)List<String>getSteps()List<String>getSubConverters()Returns the sub converters of this chained converter.voidinit(ConverterDescriptor descriptor)Initializes the Converter.booleanisSubConvertersBased()Returns true if this chained converter is sub converters based, false otherwise. 
 - 
 
- 
- 
Method Detail
- 
convert
public BlobHolder convert(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
Description copied from interface:ConverterMain method to handle the real Conversion Job.Returned
BlobHoldermust implementCachableBlobHolder, otherwise result won't be cached.- Specified by:
 convertin interfaceConverter- Throws:
 ConversionException
 
- 
convertBasedSubConverters
protected BlobHolder convertBasedSubConverters(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
- Throws:
 ConversionException
 
- 
convertBasedOnMimeTypes
protected BlobHolder convertBasedOnMimeTypes(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
Tries to find a chain of converters that fits the mime-types chain.- Throws:
 ConversionException
 
- 
init
public void init(ConverterDescriptor descriptor)
Description copied from interface:ConverterInitializes the Converter.This can be used to retrieve some configuration information from the XMap Descriptor.
 
- 
getSubConverters
public List<String> getSubConverters()
Returns the sub converters of this chained converter.- Since:
 - 5.9.2
 
 
- 
isSubConvertersBased
public boolean isSubConvertersBased()
Returns true if this chained converter is sub converters based, false otherwise.- Since:
 - 5.9.4
 
 
 - 
 
 -