Class SoapConversionClient
- java.lang.Object
-
- com.logicaldoc.webservice.soap.client.SoapClient<ConversionService>
-
- com.logicaldoc.conversion.webservice.soap.client.SoapConversionClient
-
- All Implemented Interfaces:
ConversionService
public class SoapConversionClient extends com.logicaldoc.webservice.soap.client.SoapClient<ConversionService> implements ConversionService
Conversion Web Service client.- Since:
- 7.7.3
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description SoapConversionClient(String endpoint)SoapConversionClient(String endpoint, int gzipThreshold, boolean log, int timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.activation.DataHandlerconvertDocument(String sid, long docId, String fileVersion, String format)Converts an existing document and saves the generated conversion in LogicalDOC.longconvertDocumentAndSave(String sid, long docId, String fileVersion, String format)Converts an existing document and saves the generated conversion in LogicalDOC.voidconvertDocumentToFile(String sid, long docId, String fileVersion, String format, File output)voidconvertDocumentToPdf(String sid, long docId, String fileVersion)Creates the PDF conversion of the given document.voidconvertFile(String sid, File input, File output)javax.activation.DataHandlerconvertFile(String sid, String fileName, String format, javax.activation.DataHandler fileContent)Converts a given file and returns the conversion.
-
-
-
Constructor Detail
-
SoapConversionClient
public SoapConversionClient(String endpoint, int gzipThreshold, boolean log, int timeout) throws IOException
- Throws:
IOException
-
SoapConversionClient
public SoapConversionClient(String endpoint) throws IOException
- Throws:
IOException
-
-
Method Detail
-
convertDocumentToFile
public void convertDocumentToFile(String sid, long docId, String fileVersion, String format, File output) throws Exception
- Throws:
Exception
-
convertDocument
public javax.activation.DataHandler convertDocument(String sid, long docId, String fileVersion, String format) throws Exception
Description copied from interface:ConversionServiceConverts an existing document and saves the generated conversion in LogicalDOC.- Specified by:
convertDocumentin interfaceConversionService- Parameters:
sid- Session identifierdocId- The document idfileVersion- The file versionformat- The output conversion format- Returns:
- The conversion's binary
- Throws:
Exception- error in the service
-
convertDocumentAndSave
public long convertDocumentAndSave(String sid, long docId, String fileVersion, String format) throws Exception
Description copied from interface:ConversionServiceConverts an existing document and saves the generated conversion in LogicalDOC.- Specified by:
convertDocumentAndSavein interfaceConversionService- Parameters:
sid- Session identifierdocId- The document idfileVersion- The file versionformat- The output conversion format- Returns:
- the ID of the generated conversion file
- Throws:
Exception- error in the service
-
convertDocumentToPdf
public void convertDocumentToPdf(String sid, long docId, String fileVersion) throws Exception
Description copied from interface:ConversionServiceCreates the PDF conversion of the given document. If the conversion was already created, nothing will happen.- Specified by:
convertDocumentToPdfin interfaceConversionService- Parameters:
sid- Session identifierdocId- The document idfileVersion- The specific file version(it can be empty)- Throws:
Exception- error in the service
-
convertFile
public javax.activation.DataHandler convertFile(String sid, String fileName, String format, javax.activation.DataHandler fileContent) throws Exception
Description copied from interface:ConversionServiceConverts a given file and returns the conversion.- Specified by:
convertFilein interfaceConversionService- Parameters:
sid- Session identifierfileName- Name of the source fileformat- The output conversion formatfileContent- The content of the input file- Returns:
- the raw content of the converted file
- Throws:
Exception- error in the service
-
-