com.groupdocs.viewer.handlers.input
Class InputDataHandler

java.lang.Object
  extended by com.groupdocs.viewer.handlers.input.InputDataHandler
Direct Known Subclasses:
AmazonS3InputDataHandler, AzureInputDataHandler

public abstract class InputDataHandler
extends Object

Data source interface
Used to define other data sources such as from databases or virtual devices

Author:
Alex Bobkov, Aleksey Permyakov

Constructor Summary
InputDataHandler()
           
 
Method Summary
abstract  InputStream getFile(String guid)
          Get file
abstract  GroupDocsFileDescription getFileDescription(String guid)
          Get file description
abstract  List<GroupDocsFileDescription> getFileDescriptionList(String directory)
          Get file description list
 boolean getImage(String guid, String imageSrc, OutputStream outputStream)
          Get external image (for html and some files with images)
abstract  String saveFile(InputStream inputStream, String fileName, Integer timeToLive, String encryptedKey)
          Save file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputDataHandler

public InputDataHandler()
Method Detail

getFileDescriptionList

public abstract List<GroupDocsFileDescription> getFileDescriptionList(String directory)
                                                               throws Exception
Get file description list

Parameters:
directory - files location directory
Returns:
list of file descriptions
Throws:
Exception

getFileDescription

public abstract GroupDocsFileDescription getFileDescription(String guid)
                                                     throws Exception
Get file description

Parameters:
guid - file id
Returns:
Throws:
Exception

getFile

public abstract InputStream getFile(String guid)
                             throws Exception
Get file

Parameters:
guid - file id
Returns:
InputStream of the file
Throws:
Exception

saveFile

public abstract String saveFile(InputStream inputStream,
                                String fileName,
                                Integer timeToLive,
                                String encryptedKey)
                         throws Exception
Save file

Parameters:
inputStream - Input stream of object to be saved/uploaded
fileName - file name
timeToLive - TTL, 0 - unlimited
encryptedKey - encryption key
Returns:
token Id
Throws:
Exception

getImage

public boolean getImage(String guid,
                        String imageSrc,
                        OutputStream outputStream)
Get external image (for html and some files with images)

Parameters:
guid - file GUID
imageSrc - value of src attribute from img tag in html file
outputStream - stream to write image data
Returns:


Copyright © 2015. All rights reserved.