Interface PreviewService

  • All Known Implementing Classes:
    DefaultPreviewService

    public interface PreviewService
    The preview service. Its goal is to generate a preview of a document.
    Author:
    Yohann Chastagnier
    • Method Detail

      • isPreviewable

        boolean isPreviewable​(File file)
        Verifying if it is possible to obtain a preview of the given file.
        Parameters:
        file - the file to verify.
        Returns:
        true preview is possible, false otherwise.
      • getPreview

        Preview getPreview​(ViewerContext viewerContext)
        Getting a Preview instance of the given file
        Parameters:
        viewerContext - the context of the preview.
        Returns:
        a Preview instance.
      • removePreview

        void removePreview​(ViewerContext viewerContext)
        Removes data about a preview from given context.
        Parameters:
        viewerContext - the context of the preview.