com.groupdocs.viewer.caching.extra

Class CacheableFactory



  • public class CacheableFactory
    extends Object
    This class helps customising Cache.
    You can implement your custom models for serialization and override methods in this class for return them instead of embedded ones.
    Just extend CacheableFactory and call CacheableFactory.setInstance(new YourCustomCacheableFactory())
    More details in documentation
    • Constructor Detail

      • CacheableFactory

        public CacheableFactory()
    • Method Detail

      • newArchiveViewInfo

        public ArchiveViewInfo newArchiveViewInfo(FileType fileType,
                                         List<Page> pages,
                                         List<String> folders)
        Creates implementation of ArchiveViewInfo interface
        Parameters:
        fileType - file type
        pages - pages
        folders - folders
        Returns:
        new instance of ArchiveViewInfo implementation
      • newAttachment

        public Attachment newAttachment(String fileName)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        fileName - file name
        Returns:
        new instance of Attachment implementation
      • newAttachment

        public Attachment newAttachment(String id,
                               String fileName,
                               FileType fileType,
                               long size)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        id - id
        fileName - file name
        fileType - file type
        size - size
        Returns:
        new instance of Attachment implementation
      • newAttachment

        public Attachment newAttachment(String id,
                               String fileName,
                               long size)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        id - id
        fileName - file name
        size - size
        Returns:
        new instance of Attachment implementation
      • newCadViewInfo

        public CadViewInfo newCadViewInfo(FileType fileType,
                                 List<Page> pages,
                                 List<Layer> layers,
                                 List<Layout> layouts)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        fileType - file type
        pages - pages
        layers - layers
        layouts - layouts
        Returns:
        new instance of CadViewInfo implementation
      • newCharacter

        public Character newCharacter(char character,
                             double x,
                             double y,
                             double width,
                             double height)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        character - character
        x - x
        y - y
        width - width
        height - height
        Returns:
        new instance of Character implementation
      • newFileInfo

        public FileInfo newFileInfo(FileType fileType)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        fileType - file type
        Returns:
        new instance of FileInfo implementation
      • newLayer

        public Layer newLayer(String name)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        name - name
        Returns:
        new instance of Layer implementation
      • newLayer

        public Layer newLayer(String name,
                     boolean visible)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        name - name
        visible - visibility
        Returns:
        new instance of Layer implementation
      • newLayout

        public Layout newLayout(String name,
                       double width,
                       double height)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        name - name
        width - width
        height - height
        Returns:
        new instance of Layout implementation
      • newLine

        public Line newLine(String line,
                   double x,
                   double y,
                   double width,
                   double height,
                   List<Word> words)
        Creates implementation of Line interface
        Parameters:
        line - The line.
        x - The X coordinate of the highest left point on the page layout where the rectangle that contains line begins.
        y - The Y coordinate of the highest left point on the page layout where the rectangle that contains line begins.
        width - The width of the rectangle which contains the line (in pixels).
        height - The height of the rectangle which contains the line (in pixels).
        words - The words contained by the line.
      • newOutlookViewInfo

        public OutlookViewInfo newOutlookViewInfo(FileType fileType,
                                         List<Page> pages,
                                         List<String> folders)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        fileType - file type
        pages - pages
        folders - folders
        Returns:
        new instance of OutlookViewInfo implementation
      • newPage

        public Page newPage(int number,
                   boolean visible)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        number - number
        visible - visibility
        Returns:
        new instance of Page implementation
      • newPage

        public Page newPage(int number,
                   boolean visible,
                   int width,
                   int height)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        number - number
        visible - visibility
        width - width
        height - height
        Returns:
        new instance of Page implementation
      • newPage

        public Page newPage(int number,
                   boolean visible,
                   int width,
                   int height,
                   List<Line> lines)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        number - number
        visible - visibility
        width - width
        height - height
        lines - lines
        Returns:
        new instance of Page implementation
      • newPage

        public Page newPage(int number,
                   String name,
                   boolean visible)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        number - number
        name - name
        visible - visibility
        Returns:
        new instance of Page implementation
      • newPage

        public Page newPage(int number,
                   String name,
                   boolean visible,
                   int width,
                   int height)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        number - number
        name - name
        visible - visibility
        width - width
        height - height
        Returns:
        new instance of Page implementation
      • newPage

        public Page newPage(int number,
                   String name,
                   boolean visible,
                   int width,
                   int height,
                   List<Line> lines)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        number - number
        name - name
        visible - visibility
        width - width
        height - height
        lines - lines
        Returns:
        new instance of Page implementation
      • newPdfViewInfo

        public PdfViewInfo newPdfViewInfo(FileType fileType,
                                 List<Page> pages,
                                 boolean printingAllowed)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        fileType - file type
        pages - pages
        printingAllowed - printing allowed
        Returns:
        new instance of PdfViewInfo implementation
      • newProjectManagementViewInfo

        public ProjectManagementViewInfo newProjectManagementViewInfo(FileType fileType,
                                                             List<Page> pages,
                                                             Date startDate,
                                                             Date endDate)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        fileType - file type
        pages - pages
        startDate - start date
        endDate - end date
        Returns:
        new instance of ProjectManagementViewInfo implementation
      • newTextElement

        public <T> TextElement<T> newTextElement(T value,
                                        double x,
                                        double y,
                                        double width,
                                        double height)
        Creates implementation of TextElement interface
        Parameters:
        value - the value
        x - x
        y - y
        width - width
        height - height
        Returns:
        new instance of TextElement implementation
      • newViewInfo

        public ViewInfo newViewInfo(FileType fileType,
                           List<Page> pages)
        Creates implementation of ViewInfo interface
        Parameters:
        fileType - file type
        pages - pages
        Returns:
        new instance of ViewInfo implementation
      • newWord

        public Word newWord(String word,
                   double x,
                   double y,
                   double width,
                   double height,
                   List<Character> characters)
        Creates implementation of LotusNotesViewInfo interface
        Parameters:
        word - the word
        x - x
        y - y
        width - width
        height - height
        characters - characters
        Returns:
        new instance of Word implementation