Class AbstractLocalTransform

    • Field Detail

      • log

        protected static final org.apache.commons.logging.Log log
      • name

        protected final String name
      • transformsTransformOptionNames

        protected final Set<String> transformsTransformOptionNames
    • Method Detail

      • isAvailable

        public abstract boolean isAvailable()
      • getName

        public String getName()
      • getTransformsTransformOptionNames

        public Set<String> getTransformsTransformOptionNames()
      • transform

        public void transform​(ContentReader reader,
                              ContentWriter writer,
                              Map<String,​String> transformOptions,
                              String renditionName,
                              NodeRef sourceNodeRef)
        Description copied from interface: LocalTransform
        Requests a synchronous transform.
        Specified by:
        transform in interface LocalTransform
        Parameters:
        reader - of the source content
        writer - to the target node's content
        transformOptions - the actual name value pairs available that could be passed to the Transform Service.
        renditionName - (optional) name for the set of options and target mimetype. If supplied is used to cache results to avoid having to work out if a given transformation is supported a second time. The sourceMimetype and sourceSizeInBytes may still change. In the case of ACS this is the rendition name.
        sourceNodeRef - the source node
      • getStrippedTransformOptions

        public Map<String,​String> getStrippedTransformOptions​(Map<String,​String> transformOptions)
        Returns a subset of the supplied actual transform options from the rendition definition that are known to this transformer. The ones that will be passed to the T-Engine. It strips out extra ones.
        Parameters:
        transformOptions - the complete set of actual transform options. This will be returned if all options are known to this transformer. Otherwise a new Map is returned.
        Returns:
        the transformOptions to be past to the T-Engine.