Class ChainedConverter
java.lang.Object
org.nuxeo.ecm.core.convert.extension.ChainedConverter
- All Implemented Interfaces:
Converter
Specific
Converter
implementation 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
Modifier and TypeFieldDescriptionprotected boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvert
(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) getSteps()
Returns the sub converters of this chained converter.void
init
(ConverterDescriptor descriptor) Initializes the Converter.boolean
Returns true if this chained converter is sub converters based, false otherwise.
-
Field Details
-
subConvertersBased
protected boolean subConvertersBased -
steps
-
subConverters
-
-
Constructor Details
-
ChainedConverter
public ChainedConverter() -
ChainedConverter
-
-
Method Details
-
convert
public BlobHolder convert(BlobHolder blobHolder, Map<String, Serializable> parameters) throws ConversionExceptionDescription copied from interface:Converter
Main method to handle the real Conversion Job.Returned
BlobHolder
must implementCachableBlobHolder
, otherwise result won't be cached.- Specified by:
convert
in 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 ConversionExceptionTries to find a chain of converters that fits the mime-types chain.- Throws:
ConversionException
-
init
Description copied from interface:Converter
Initializes the Converter.This can be used to retrieve some configuration information from the XMap Descriptor.
-
getSteps
-
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
-