Interface ThumbnailGenerator

All Known Implementing Classes:
BaseThumbnailGenerator, CommandGenerator, EmptyGenerator, HtmlTagBasedGenerator

public interface ThumbnailGenerator
Interface for thumbnail generation implementations. Provides methods for creating thumbnails from various document types.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.codelibs.core.misc.Tuple3<String,String,String>
    createTask(String path, Map<String,Object> docMap)
    Creates a thumbnail generation task.
    void
    Destroys this thumbnail generator and releases any resources.
    boolean
    generate(String thumbnailId, File outputFile)
    Generates a thumbnail for the given thumbnail ID and saves it to the output file.
    Gets the name of this thumbnail generator.
    boolean
    Checks if this thumbnail generator is available for use.
    boolean
    Checks if this generator can handle the given document.
  • Method Details

    • getName

      String getName()
      Gets the name of this thumbnail generator.
      Returns:
      The generator name.
    • generate

      boolean generate(String thumbnailId, File outputFile)
      Generates a thumbnail for the given thumbnail ID and saves it to the output file.
      Parameters:
      thumbnailId - the unique identifier for the thumbnail
      outputFile - the file where the generated thumbnail will be saved
      Returns:
      true if the thumbnail was successfully generated, false otherwise
    • isTarget

      boolean isTarget(Map<String,Object> docMap)
      Checks if this generator can handle the given document.
      Parameters:
      docMap - The document map containing metadata.
      Returns:
      True if this generator can handle the document, false otherwise.
    • isAvailable

      boolean isAvailable()
      Checks if this thumbnail generator is available for use.
      Returns:
      True if available, false otherwise.
    • destroy

      void destroy()
      Destroys this thumbnail generator and releases any resources.
    • createTask

      org.codelibs.core.misc.Tuple3<String,String,String> createTask(String path, Map<String,Object> docMap)
      Creates a thumbnail generation task.
      Parameters:
      path - The path to the source document.
      docMap - The document map containing metadata.
      Returns:
      A tuple containing task information.