public abstract class ViewerHandler<T extends Page> extends Object
Base class for Viewer handlers.
Constructor and Description |
---|
ViewerHandler(ViewerConfig viewerConfig,
com.groupdocs.viewer.config.EngineTypes engineType)
Initializes a new instance of the
ViewerHandler{T} class. |
ViewerHandler(ViewerConfig viewerConfig,
com.groupdocs.viewer.config.EngineTypes engineType,
com.groupdocs.foundation.utils.CultureInfo cultureInfo)
Initializes a new instance of the
ViewerHandler{T} class. |
ViewerHandler(ViewerConfig viewerConfig,
com.groupdocs.viewer.config.EngineTypes engineType,
IInputDataHandler inputDataHandler,
ICacheDataHandler cacheDataHandler,
IFileDataStore fileDataStore,
com.groupdocs.foundation.utils.CultureInfo cultureInfo)
Initializes a new instance of the
ViewerHandler{T} class. |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears all files from cache.
|
void |
clearCache(long olderThan)
Clears files from cache older than specified time interval.
|
ICacheDataHandler |
getCacheDataHandler()
Getter for the field
cacheDataHandler . |
DocumentInfoContainer |
getDocumentInfo(InputStream fileStream)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(InputStream fileStream,
DocumentInfoOptions documentInfoOptions)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(InputStream fileStream,
String fileName)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(InputStream fileStream,
String fileName,
DocumentInfoOptions documentInfoOptions)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(com.aspose.ms.System.IO.Stream fileStream)
getDocumentInfo.
|
DocumentInfoContainer |
getDocumentInfo(String guid)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(String guid,
DocumentInfoOptions documentInfoOptions)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(URI uri)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(URI uri,
DocumentInfoOptions documentInfoOptions)
Gets the document information.
|
DocumentInfoContainer |
getDocumentInfo(URI uri,
WindowsAuthenticationCredential credential,
DocumentInfoOptions documentInfoOptions)
Gets the document information.
|
FileContainer |
getFile(AttachmentBase attachment)
Get attachment file.
|
FileContainer |
getFile(String guid)
Get original file.
|
FileListContainer |
getFileList()
Retrieves list of files and directories for root storage path.
|
FileListContainer |
getFileList(FileListOptions fileListOptions)
Retrieves list of files and directories for root storage path.
|
IInputDataHandler |
getInputDataHandler()
Getter for the field
inputDataHandler . |
ILocalizationHandler |
getLocalizationHandler()
Getter for the field
localizationHandler . |
List<T> |
getPages(AttachmentBase attachment,
RenderOptions renderOptions)
Get list of pages representations from URI with credentials.
|
List<T> |
getPages(InputStream fileStream,
RenderOptions renderOptions)
Get list of pages HTML representations.
|
List<T> |
getPages(InputStream fileStream,
String fileName,
RenderOptions renderOptions)
Get list of pages representations.
|
List<T> |
getPages(String guid,
RenderOptions renderOptions)
Get list of pages representations.
|
List<T> |
getPages(URI uri,
RenderOptions renderOptions)
Get list of pages representations from URI.
|
List<T> |
getPages(URI uri,
WindowsAuthenticationCredential credential,
RenderOptions renderOptions)
Get list of pages representations from URI with credentials.
|
FileContainer |
getPdfFile(InputStream fileStream)
Gets the PDF file.
|
FileContainer |
getPdfFile(InputStream fileStream,
PdfFileOptions pdfFileOptions)
Gets the PDF file.
|
FileContainer |
getPdfFile(InputStream fileStream,
String fileName)
Gets the PDF file.
|
FileContainer |
getPdfFile(InputStream fileStream,
String fileName,
PdfFileOptions pdfFileOptions)
Gets the PDF file.
|
FileContainer |
getPdfFile(String guid)
Gets the PDF file.
|
FileContainer |
getPdfFile(String guid,
PdfFileOptions pdfFileOptions)
Gets the PDF file.
|
FileContainer |
getPdfFile(URI uri)
Gets the PDF file.
|
FileContainer |
getPdfFile(URI uri,
PdfFileOptions pdfFileOptions)
Gets the PDF file.
|
FileContainer |
getPdfFile(URI uri,
WindowsAuthenticationCredential credential,
PdfFileOptions pdfFileOptions)
Gets the PDF file.
|
abstract PrintableHtmlContainer |
getPrintableHtml(String guid)
Get document HTML for print.
|
abstract PrintableHtmlContainer |
getPrintableHtml(String guid,
PrintableHtmlOptions printableHtmlOptions)
Get document HTML for print.
|
DocumentFormatsContainer |
getSupportedDocumentFormats()
Gets supported document formats.
|
abstract T |
getUnlicensedViewCountExceededPage(RenderOptions renderOptions) |
ViewerConfig |
getViewerConfig()
Getter for the field
viewerConfig . |
void |
reorderPage(String guid,
ReorderPageOptions reorderPageOptions)
Reorders the page.
|
void |
rotatePage(String guid,
RotatePageOptions rotatePageOptions)
Rotates the page.
|
public ViewerHandler(ViewerConfig viewerConfig, com.groupdocs.viewer.config.EngineTypes engineType, com.groupdocs.foundation.utils.CultureInfo cultureInfo)
Initializes a new instance of the ViewerHandler{T}
class.
viewerConfig
- The viewer configuration.engineType
- The engine type.cultureInfo
- The culture.public ViewerHandler(ViewerConfig viewerConfig, com.groupdocs.viewer.config.EngineTypes engineType)
Initializes a new instance of the ViewerHandler{T}
class.
viewerConfig
- The viewer configuration.engineType
- The engine type.public ViewerHandler(ViewerConfig viewerConfig, com.groupdocs.viewer.config.EngineTypes engineType, IInputDataHandler inputDataHandler, ICacheDataHandler cacheDataHandler, IFileDataStore fileDataStore, com.groupdocs.foundation.utils.CultureInfo cultureInfo)
Initializes a new instance of the ViewerHandler{T}
class.
viewerConfig
- The viewer configuration.engineType
- The engine type.cultureInfo
- The viewer culture.inputDataHandler
- The input data handler.cacheDataHandler
- The cache data handler.fileDataStore
- The file data store.ArgumentNullException
- viewerConfigpublic void clearCache() throws Exception
Clears all files from cache.
The following example demonstrates how to clear all files from cache.Exception
- if any.public void clearCache(long olderThan) throws Exception
Clears files from cache older than specified time interval.
olderThan
- The time interval.Exception
- if any.public DocumentFormatsContainer getSupportedDocumentFormats()
Gets supported document formats.
The following example demonstrates how to get the list of supported document formats.DocumentFormatsContainer
object.public abstract T getUnlicensedViewCountExceededPage(RenderOptions renderOptions)
public DocumentInfoContainer getDocumentInfo(String guid) throws Exception
Gets the document information.
The following example demonstrates how to get document information.guid
- a String
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(String guid, DocumentInfoOptions documentInfoOptions) throws Exception
Gets the document information.
The following example demonstrates how to get document information.guid
- a String
object.documentInfoOptions
- a DocumentInfoOptions
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(InputStream fileStream) throws Exception
Gets the document information.
fileStream
- a InputStream
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(com.aspose.ms.System.IO.Stream fileStream) throws Exception
getDocumentInfo.
fileStream
- a Stream
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(InputStream fileStream, DocumentInfoOptions documentInfoOptions) throws Exception
Gets the document information.
fileStream
- a InputStream
object.documentInfoOptions
- a DocumentInfoOptions
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(InputStream fileStream, String fileName) throws Exception
Gets the document information.
fileStream
- a InputStream
object.fileName
- a String
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(InputStream fileStream, String fileName, DocumentInfoOptions documentInfoOptions) throws Exception
Gets the document information.
fileStream
- a InputStream
object.fileName
- a String
object.documentInfoOptions
- a DocumentInfoOptions
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(URI uri) throws Exception
Gets the document information.
uri
- a URI
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(URI uri, DocumentInfoOptions documentInfoOptions) throws Exception
Gets the document information.
uri
- a URI
object.documentInfoOptions
- a DocumentInfoOptions
object.DocumentInfoContainer
object.Exception
- if any.public DocumentInfoContainer getDocumentInfo(URI uri, WindowsAuthenticationCredential credential, DocumentInfoOptions documentInfoOptions) throws Exception
Gets the document information.
uri
- a URI
object.credential
- a WindowsAuthenticationCredential
object.documentInfoOptions
- a DocumentInfoOptions
object.DocumentInfoContainer
object.Exception
- if any.public FileContainer getFile(String guid) throws Exception
Get original file.
The following example demonstrates how to get original file.guid
- a String
object.FileContainer
object.Exception
- if any.public FileContainer getFile(AttachmentBase attachment) throws Exception
Get attachment file.
attachment
- a AttachmentBase
object.FileContainer
object.Exception
- if any.public FileListContainer getFileList() throws Exception
Retrieves list of files and directories for root storage path.
FileListContainer
object.Exception
- if any.public FileListContainer getFileList(FileListOptions fileListOptions) throws Exception
Retrieves list of files and directories for root storage path.
fileListOptions
- a FileListOptions
object.FileListContainer
object.Exception
- if any.public List<T> getPages(String guid, RenderOptions renderOptions) throws Exception
Get list of pages representations.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt, relative path e.g document.txt, url e.g. http://site.com/document.txt.renderOptions
- The render options.Exception
- if any.public List<T> getPages(InputStream fileStream, RenderOptions renderOptions) throws Exception
Get list of pages HTML representations.
fileStream
- The file stream.renderOptions
- The render options.Exception
- if any.public List<T> getPages(InputStream fileStream, String fileName, RenderOptions renderOptions) throws Exception
Get list of pages representations.
fileStream
- The file stream.fileName
- The file name.renderOptions
- The render options.Exception
- if any.public List<T> getPages(URI uri, RenderOptions renderOptions) throws Exception
Get list of pages representations from URI.
uri
- The URI.renderOptions
- The render options.Exception
- if any.public List<T> getPages(URI uri, WindowsAuthenticationCredential credential, RenderOptions renderOptions) throws Exception
Get list of pages representations from URI with credentials.
uri
- The URI.credential
- The credential.renderOptions
- The render options.Exception
- if any.public List<T> getPages(AttachmentBase attachment, RenderOptions renderOptions) throws Exception
Get list of pages representations from URI with credentials.
attachment
- The attachment descriptor.renderOptions
- The render options.Exception
- if any.public FileContainer getPdfFile(String guid) throws Exception
Gets the PDF file.
The following example demonstrates how to render document as PDF.guid
- a String
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(String guid, PdfFileOptions pdfFileOptions) throws Exception
Gets the PDF file.
The following example demonstrates how to render document as PDF.guid
- a String
object.pdfFileOptions
- a PdfFileOptions
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(InputStream fileStream) throws Exception
Gets the PDF file.
fileStream
- a InputStream
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(InputStream fileStream, PdfFileOptions pdfFileOptions) throws Exception
Gets the PDF file.
fileStream
- a InputStream
object.pdfFileOptions
- a PdfFileOptions
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(InputStream fileStream, String fileName) throws Exception
Gets the PDF file.
fileStream
- a InputStream
object.fileName
- a String
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(InputStream fileStream, String fileName, PdfFileOptions pdfFileOptions) throws Exception
Gets the PDF file.
fileStream
- a InputStream
object.fileName
- a String
object.pdfFileOptions
- a PdfFileOptions
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(URI uri) throws Exception
Gets the PDF file.
uri
- a URI
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(URI uri, PdfFileOptions pdfFileOptions) throws Exception
Gets the PDF file.
uri
- a URI
object.pdfFileOptions
- a PdfFileOptions
object.FileContainer
object.Exception
- if any.public FileContainer getPdfFile(URI uri, WindowsAuthenticationCredential credential, PdfFileOptions pdfFileOptions) throws Exception
Gets the PDF file.
uri
- a URI
object.credential
- a WindowsAuthenticationCredential
object.pdfFileOptions
- a PdfFileOptions
object.FileContainer
object.Exception
- if any.public abstract PrintableHtmlContainer getPrintableHtml(String guid, PrintableHtmlOptions printableHtmlOptions) throws Exception
Get document HTML for print.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, url e.g. http://site.com/document.txtprintableHtmlOptions
- The rotatePageOptions.Exception
- if any.public abstract PrintableHtmlContainer getPrintableHtml(String guid) throws Exception
Get document HTML for print.
guid
- The file unique identifier, full path for local storage e.g. c:\\storage\\document.txt,
relative path e.g document.txt, url e.g. http://site.com/document.txtException
- if any.public void rotatePage(String guid, RotatePageOptions rotatePageOptions) throws Exception
Rotates the page.
guid
- a String
object.rotatePageOptions
- a RotatePageOptions
object.Exception
- if any.public void reorderPage(String guid, ReorderPageOptions reorderPageOptions) throws Exception
Reorders the page.
guid
- a String
object.reorderPageOptions
- a ReorderPageOptions
object.Exception
- if any.public ICacheDataHandler getCacheDataHandler()
Getter for the field cacheDataHandler
.
ICacheDataHandler
object.public IInputDataHandler getInputDataHandler()
Getter for the field inputDataHandler
.
IInputDataHandler
object.public ILocalizationHandler getLocalizationHandler()
Getter for the field localizationHandler
.
ILocalizationHandler
object.public ViewerConfig getViewerConfig()
Getter for the field viewerConfig
.
ViewerConfig
object.Copyright © 2018. All rights reserved.