Class TransformerSelectorImpl

  • All Implemented Interfaces:
    TransformerSelector

    @Deprecated
    public class TransformerSelectorImpl
    extends java.lang.Object
    implements TransformerSelector
    Deprecated.
    The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
    Default transformer selector implementation, which sorts by priority and then by average transform time. The transform time is only used once a threshold (number of transforms) has been reached. This average is maintained for each source target mimetype pair.

    Prior to the introduction of this class the transformation time was only kept for each transformer. There was no threshold and there was a concept of 'Explicit' transformers, which would cause all other transformers to be discarded. It is still possible to disable transformers by giving adding unsupported mappings as has been done for transformers that would not have been used in the past as there existed one or more 'explicit' transformers (a concept not used by this TransformerSelector). By default a transformer has a priority of 10. Old 'Explicit' transformers have been given a priority of 5.

    Author:
    Alan Davis
    • Constructor Detail

      • TransformerSelectorImpl

        public TransformerSelectorImpl()
        Deprecated.
    • Method Detail

      • setTransformerConfig

        public void setTransformerConfig​(TransformerConfig transformerConfig)
        Deprecated.
      • setContentTransformerRegistry

        public void setContentTransformerRegistry​(ContentTransformerRegistry contentTransformerRegistry)
        Deprecated.
      • setTransformerDebug

        public void setTransformerDebug​(TransformerDebug transformerDebug)
        Deprecated.
      • selectTransformers

        public java.util.List<ContentTransformer> selectTransformers​(java.lang.String sourceMimetype,
                                                                     long sourceSize,
                                                                     java.lang.String targetMimetype,
                                                                     TransformationOptions options)
        Deprecated.
        Description copied from interface: TransformerSelector
        Returns a sorted list of transformers that identifies the order in which transformers should be tried.
        Specified by:
        selectTransformers in interface TransformerSelector
        options - transformation options
        Returns:
        a sorted list of transformers, with the best one first.