fr.opensagres.xdocreport.remoting.converter.server
Class ConverterServiceImpl

java.lang.Object
  extended by fr.opensagres.xdocreport.remoting.converter.server.ConverterServiceImpl
All Implemented Interfaces:
ConverterService

public class ConverterServiceImpl
extends Object
implements ConverterService

Document converter REST Web Service implementation.


Constructor Summary
ConverterServiceImpl()
           
 
Method Summary
 javax.ws.rs.core.Response convert(DataSource content, String outputFormat, String via, boolean download)
          Convert the given document (docx, odt) to the given format (PDF, XHTML).
protected  String getOutputFileName(String filename, ConverterTypeTo to)
          Returns the output file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterServiceImpl

public ConverterServiceImpl()
Method Detail

convert

public javax.ws.rs.core.Response convert(DataSource content,
                                         String outputFormat,
                                         String via,
                                         boolean download)
Description copied from interface: ConverterService
Convert the given document (docx, odt) to the given format (PDF, XHTML).

Specified by:
convert in interface ConverterService
Parameters:
content - the data source stream of the document to convert.
outputFormat - the output format.
via - used to select the well converter (docx4j, XDOcReport etc)
download - true if converted document must be download and false otherwise.
Returns:

getOutputFileName

protected String getOutputFileName(String filename,
                                   ConverterTypeTo to)
Returns the output file name.

Parameters:
filename -
to -
Returns:


Copyright © 2013. All rights reserved.