Class DocImageHandler

  • All Implemented Interfaces:
    IXMLConfigurable
    Direct Known Subclasses:
    ScreenshotHandler

    public class DocImageHandler
    extends Object
    implements IXMLConfigurable

    Handles images associated with a document (which is different than a document being itself an image). Examples can be screenshots, featured image, etc. Images can be stored in a document metadata/field or in a local directory.

    XML configuration usage:

    
    <targets>[metadata|directory] (One or both, separated by comma.)</targets>
    <imageFormat>(Image format. Default is "png".)</imageFormat>
    <!-- The following applies to the "directory" target: -->
    <targetDir
        field="(Document field to store the local path to the image.)"
        structure="[url2path|date|datetime]">
      (Local directory where to save images.)
    </targetDir>
    <!-- The following applies to the "metadata" target: -->
    <targetMetaField>(Document field where to store the image.)</targetMetaField>

    The above XML configurable options can be nested in a parent tag of any name. The expected parent tag name is defined by the consuming classes.

    Since:
    3.0.0
    Author:
    Pascal Essiembre