public final class OpenOfficeRemoteConverterPlugin extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_UNO_PORT
Le port par défaut pour accéder à OpenOffice est 8100.
|
| Constructor and Description |
|---|
OpenOfficeRemoteConverterPlugin(io.vertigo.dynamo.file.FileManager fileManager,
String unoHost,
String unoPort,
Optional<Integer> convertTimeoutSeconds)
Constructeur.
|
| Modifier and Type | Method and Description |
|---|---|
io.vertigo.dynamo.file.model.VFile |
convertToFormat(io.vertigo.dynamo.file.model.VFile file,
String targetFormat)
Retourne le fichier converti
L'appel à l'OOO distant est synchronisé, car il supporte mal les converssions concurrentes.
|
protected static com.sun.star.beans.PropertyValue[] |
getFileProperties(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType)
Fournit les proterties de fichier pour un format de conversion.
|
protected static com.sun.star.beans.PropertyValue[] |
getFileProperties(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType,
com.sun.star.io.XInputStream inputStream)
Fournit les proterties de fichier pour un format de conversion et un flux de lecture.
|
protected static com.sun.star.beans.PropertyValue[] |
getFileProperties(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType,
com.sun.star.io.XOutputStream outputStream)
Fournit les proterties de fichier pour un format de conversion et un flux d'ecriture.
|
protected static String |
getFilterNameFromExtension(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType) |
protected com.sun.star.lang.XComponent |
loadDocument(File inputFile,
io.vertigo.quarto.plugins.converter.openoffice.OpenOfficeConnection openOfficeConnection)
Lecture d'un docuement.
|
void |
start() |
void |
stop() |
protected void |
storeDocument(File outputFile,
com.sun.star.lang.XComponent xDoc,
io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat targetFormat,
io.vertigo.quarto.plugins.converter.openoffice.OpenOfficeConnection openOfficeConnection)
Ecriture du document.
|
public static final int DEFAULT_UNO_PORT
@Inject
public OpenOfficeRemoteConverterPlugin(io.vertigo.dynamo.file.FileManager fileManager,
@Named(value="unohost")
String unoHost,
@Named(value="unoport")
String unoPort,
@Named(value="convertTimeoutSeconds")
Optional<Integer> convertTimeoutSeconds)
fileManager - Manager de gestion des fichiersunoHost - Hote du serveur OpenOfficeunoPort - Port de connexion au serveur OpenOfficeconvertTimeoutSeconds - Timeout de conversion des documentsprotected void storeDocument(File outputFile, com.sun.star.lang.XComponent xDoc, io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat targetFormat, io.vertigo.quarto.plugins.converter.openoffice.OpenOfficeConnection openOfficeConnection) throws Exception
outputFile - Fichier de sortiexDoc - Document OpenOffice sourcetargetFormat - Format de sortieopenOfficeConnection - Connection à OpenOfficeException - Erreur de traitementprotected com.sun.star.lang.XComponent loadDocument(File inputFile, io.vertigo.quarto.plugins.converter.openoffice.OpenOfficeConnection openOfficeConnection) throws Exception
inputFile - Fichier sourceopenOfficeConnection - Connection à OpenOfficeException - Erreur de traitementpublic void start()
start in interface io.vertigo.lang.Activeablepublic void stop()
stop in interface io.vertigo.lang.Activeablepublic final io.vertigo.dynamo.file.model.VFile convertToFormat(io.vertigo.dynamo.file.model.VFile file,
String targetFormat)
convertToFormat in interface ConverterPluginfile - Fichier à convertirtargetFormat - Type de document de sortie ODT,RTF,DOC,CSV,PDFprotected static final com.sun.star.beans.PropertyValue[] getFileProperties(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType)
docType - formatprotected static final com.sun.star.beans.PropertyValue[] getFileProperties(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType,
com.sun.star.io.XOutputStream outputStream)
docType - docType formatoutputStream - Flux d'ecritureprotected static final com.sun.star.beans.PropertyValue[] getFileProperties(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType,
com.sun.star.io.XInputStream inputStream)
docType - docType formatinputStream - Flux de lectureprotected static final String getFilterNameFromExtension(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType)
docType - Format de conversionCopyright © 2017. All Rights Reserved.