Package org.codelibs.fess.thumbnail
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 TypeMethodDescriptioncreateTask(String path, Map<String, Object> docMap) Creates a thumbnail generation task.voiddestroy()Destroys this thumbnail generator and releases any resources.booleanGenerates a thumbnail for the given thumbnail ID and saves it to the output file.getName()Gets the name of this thumbnail generator.booleanChecks if this thumbnail generator is available for use.booleanChecks 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
Generates a thumbnail for the given thumbnail ID and saves it to the output file.- Parameters:
thumbnailId- the unique identifier for the thumbnailoutputFile- the file where the generated thumbnail will be saved- Returns:
- true if the thumbnail was successfully generated, false otherwise
-
isTarget
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, createTaskString> (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.
-