CacheableFactory

Inheritance: java.lang.Object

public class CacheableFactory

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

Constructors

Constructor Description
CacheableFactory()

Methods

Method Description
getInstance() Gets instance of CacheableFactory
setInstance(CacheableFactory instance) Sets instance of CacheableFactory
newViewInfo(FileType fileType, List pages) Creates implementation of ViewInfo interface
newLotusNotesViewInfo(FileType fileType, List pages, int notesCount) Creates implementation of LotusNotesViewInfo interface
newArchiveViewInfo(FileType fileType, List pages, List folders) Creates implementation of ArchiveViewInfo interface
newCharacter(char character, double x, double y, double width, double height) Creates implementation of LotusNotesViewInfo interface
newFileInfo(FileType fileType) Creates implementation of LotusNotesViewInfo interface
newLayer(String name, boolean visible) Creates implementation of LotusNotesViewInfo interface
newLayer(String name) Creates implementation of LotusNotesViewInfo interface
newLayout(String name, double width, double height) Creates implementation of LotusNotesViewInfo interface
newLine(String line, double x, double y, double width, double height, List words) Creates implementation of Line interface
newAttachment(String fileName, String filePath) Creates implementation of LotusNotesViewInfo interface
newAttachment(String id, String fileName, String filePath, long size) Creates implementation of LotusNotesViewInfo interface
newAttachment(String id, String fileName, String filePath, FileType fileType, long size) Creates implementation of LotusNotesViewInfo interface
newOutlookViewInfo(FileType fileType, List pages, List folders) Creates implementation of LotusNotesViewInfo interface
newPage(int number, boolean visible) Creates implementation of LotusNotesViewInfo interface
newPage(int number, String name, boolean visible) Creates implementation of LotusNotesViewInfo interface
newPage(int number, String name, boolean visible, int width, int height) Creates implementation of LotusNotesViewInfo interface
newPage(int number, boolean visible, int width, int height) Creates implementation of LotusNotesViewInfo interface
newPage(int number, String name, boolean visible, int width, int height, List lines) Creates implementation of LotusNotesViewInfo interface
newPage(int number, boolean visible, int width, int height, List lines) Creates implementation of LotusNotesViewInfo interface
newPdfViewInfo(FileType fileType, List pages, boolean printingAllowed) Creates implementation of LotusNotesViewInfo interface
newCadViewInfo(FileType fileType, List pages, List layers, List layouts) Creates implementation of LotusNotesViewInfo interface
newProjectManagementViewInfo(FileType fileType, List pages, Date startDate, Date endDate) Creates implementation of LotusNotesViewInfo interface
newTextElement(T value, double x, double y, double width, double height) Creates implementation of TextElement interface
newMboxViewInfo(FileType fileType, List pages, int notesCount) Creates implementation of TextElement interface
newWord(String word, double x, double y, double width, double height, List characters) Creates implementation of LotusNotesViewInfo interface

CacheableFactory()

public CacheableFactory()

getInstance()

public static CacheableFactory getInstance()

Gets instance of CacheableFactory

Returns: CacheableFactory - instance of CacheableFactory

setInstance(CacheableFactory instance)

public static void setInstance(CacheableFactory instance)

Sets instance of CacheableFactory

Parameters:

Parameter Type Description
instance CacheableFactory instance of CacheableFactory

newViewInfo(FileType fileType, List pages)

public ViewInfo newViewInfo(FileType fileType, List<Page> pages)

Creates implementation of ViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type
pages java.util.List<com.groupdocs.viewer.results.Page> pages

Returns: ViewInfo - new instance of ViewInfo implementation

newLotusNotesViewInfo(FileType fileType, List pages, int notesCount)

public LotusNotesViewInfo newLotusNotesViewInfo(FileType fileType, List<Page> pages, int notesCount)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type
pages java.util.List<com.groupdocs.viewer.results.Page> pages
notesCount int nodes count

Returns: LotusNotesViewInfo - new instance of LotusNotesViewInfo implementation

newArchiveViewInfo(FileType fileType, List pages, List folders)

public ArchiveViewInfo newArchiveViewInfo(FileType fileType, List<Page> pages, List<String> folders)

Creates implementation of ArchiveViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type
pages java.util.List<com.groupdocs.viewer.results.Page> pages
folders java.util.List<java.lang.String> folders

Returns: ArchiveViewInfo - new instance of ArchiveViewInfo implementation

newCharacter(char character, double x, double y, double width, double height)

public Character newCharacter(char character, double x, double y, double width, double height)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
character char character
x double x
y double y
width double width
height double height

Returns: Character - new instance of Character implementation

newFileInfo(FileType fileType)

public FileInfo newFileInfo(FileType fileType)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type

Returns: FileInfo - new instance of FileInfo implementation

newLayer(String name, boolean visible)

public Layer newLayer(String name, boolean visible)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
name java.lang.String name
visible boolean visibility

Returns: Layer - new instance of Layer implementation

newLayer(String name)

public Layer newLayer(String name)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
name java.lang.String name

Returns: Layer - new instance of Layer implementation

newLayout(String name, double width, double height)

public Layout newLayout(String name, double width, double height)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
name java.lang.String name
width double width
height double height

Returns: Layout - new instance of Layout implementation

newLine(String line, double x, double y, double width, double height, List words)

public Line newLine(String line, double x, double y, double width, double height, List<Word> words)

Creates implementation of Line interface

Parameters:

Parameter Type Description
line java.lang.String The line.
x double The X coordinate of the highest left point on the page layout where the rectangle that contains line begins.
y double The Y coordinate of the highest left point on the page layout where the rectangle that contains line begins.
width double The width of the rectangle which contains the line (in pixels).
height double The height of the rectangle which contains the line (in pixels).
words java.util.List<com.groupdocs.viewer.results.Word> The words contained by the line.

Returns: Line

newAttachment(String fileName, String filePath)

public Attachment newAttachment(String fileName, String filePath)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
fileName java.lang.String file name
filePath java.lang.String Attachment relative path e.g. folder/file.docx or filename when the file is located in the root of an archive, in e-mail message or data file.

Returns: Attachment - new instance of Attachment implementation

newAttachment(String id, String fileName, String filePath, long size)

public Attachment newAttachment(String id, String fileName, String filePath, long size)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
id java.lang.String id
fileName java.lang.String file name
filePath java.lang.String Attachment relative path e.g. folder/file.docx or filename when the file is located in the root of an archive, in e-mail message or data file.
size long size

Returns: Attachment - new instance of Attachment implementation

newAttachment(String id, String fileName, String filePath, FileType fileType, long size)

public Attachment newAttachment(String id, String fileName, String filePath, FileType fileType, long size)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
id java.lang.String id
fileName java.lang.String file name
filePath java.lang.String Attachment relative path e.g. folder/file.docx or filename when the file is located in the root of an archive, in e-mail message or data file.
fileType FileType file type
size long size

Returns: Attachment - new instance of Attachment implementation

newOutlookViewInfo(FileType fileType, List pages, List folders)

public OutlookViewInfo newOutlookViewInfo(FileType fileType, List<Page> pages, List<String> folders)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type
pages java.util.List<com.groupdocs.viewer.results.Page> pages
folders java.util.List<java.lang.String> folders

Returns: OutlookViewInfo - new instance of OutlookViewInfo implementation

newPage(int number, boolean visible)

public Page newPage(int number, boolean visible)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
number int number
visible boolean visibility

Returns: Page - new instance of Page implementation

newPage(int number, String name, boolean visible)

public Page newPage(int number, String name, boolean visible)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
number int number
name java.lang.String name
visible boolean visibility

Returns: Page - new instance of Page implementation

newPage(int number, String name, boolean visible, int width, int height)

public Page newPage(int number, String name, boolean visible, int width, int height)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
number int number
name java.lang.String name
visible boolean visibility
width int width
height int height

Returns: Page - new instance of Page implementation

newPage(int number, boolean visible, int width, int height)

public Page newPage(int number, boolean visible, int width, int height)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
number int number
visible boolean visibility
width int width
height int height

Returns: Page - new instance of Page implementation

newPage(int number, String name, boolean visible, int width, int height, List lines)

public Page newPage(int number, String name, boolean visible, int width, int height, List<Line> lines)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
number int number
name java.lang.String name
visible boolean visibility
width int width
height int height
lines java.util.List<com.groupdocs.viewer.results.Line> lines

Returns: Page - new instance of Page implementation

newPage(int number, boolean visible, int width, int height, List lines)

public Page newPage(int number, boolean visible, int width, int height, List<Line> lines)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
number int number
visible boolean visibility
width int width
height int height
lines java.util.List<com.groupdocs.viewer.results.Line> lines

Returns: Page - new instance of Page implementation

newPdfViewInfo(FileType fileType, List pages, boolean printingAllowed)

public PdfViewInfo newPdfViewInfo(FileType fileType, List<Page> pages, boolean printingAllowed)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type
pages java.util.List<com.groupdocs.viewer.results.Page> pages
printingAllowed boolean printing allowed

Returns: PdfViewInfo - new instance of PdfViewInfo implementation

newCadViewInfo(FileType fileType, List pages, List layers, List layouts)

public CadViewInfo newCadViewInfo(FileType fileType, List<Page> pages, List<Layer> layers, List<Layout> layouts)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type
pages java.util.List<com.groupdocs.viewer.results.Page> pages
layers java.util.List<com.groupdocs.viewer.results.Layer> layers
layouts java.util.List<com.groupdocs.viewer.results.Layout> layouts

Returns: CadViewInfo - new instance of CadViewInfo implementation

newProjectManagementViewInfo(FileType fileType, List pages, Date startDate, Date endDate)

public ProjectManagementViewInfo newProjectManagementViewInfo(FileType fileType, List<Page> pages, Date startDate, Date endDate)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
fileType FileType file type
pages java.util.List<com.groupdocs.viewer.results.Page> pages
startDate java.util.Date start date
endDate java.util.Date end date

Returns: ProjectManagementViewInfo - new instance of ProjectManagementViewInfo implementation

newTextElement(T value, double x, double y, double width, double height)

public TextElement<T> <T>newTextElement(T value, double x, double y, double width, double height)

Creates implementation of TextElement interface

Parameters:

Parameter Type Description
value T the value
x double x
y double y
width double width
height double height

Returns: TextElement - new instance of TextElement implementation

newMboxViewInfo(FileType fileType, List pages, int notesCount)

public MboxViewInfo newMboxViewInfo(FileType fileType, List<Page> pages, int notesCount)

Creates implementation of TextElement interface

Parameters:

Parameter Type Description
fileType FileType The type of the file.
pages java.util.List<com.groupdocs.viewer.results.Page> The list of pages to view.
notesCount int The notes count contained by the Lotus database storage file.

Returns: com.groupdocs.viewer.results.MboxViewInfo - new instance of MboxViewInfo implementation

newWord(String word, double x, double y, double width, double height, List characters)

public Word newWord(String word, double x, double y, double width, double height, List<Character> characters)

Creates implementation of LotusNotesViewInfo interface

Parameters:

Parameter Type Description
word java.lang.String the word
x double x
y double y
width double width
height double height
characters java.util.List<com.groupdocs.viewer.results.Character> characters

Returns: Word - new instance of Word implementation