Class OpenOfficeLocalConverterPlugin
- java.lang.Object
-
- io.vertigo.quarto.plugins.converter.openoffice.OpenOfficeLocalConverterPlugin
-
- All Implemented Interfaces:
io.vertigo.core.node.component.Activeable
,io.vertigo.core.node.component.CoreComponent
,io.vertigo.core.node.component.Plugin
,ConverterPlugin
public final class OpenOfficeLocalConverterPlugin extends Object
Conversion des fichiers à partir de OpenOffice.- Author:
- npiedeloup
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_UNO_PORT
Le port par défaut pour accéder à OpenOffice est 8100.
-
Constructor Summary
Constructors Constructor Description OpenOfficeLocalConverterPlugin(String unoPort, Optional<Integer> convertTimeoutSecondsOpt)
Constructeur.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VFile
convertToFormat(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.
-
-
-
Field Detail
-
DEFAULT_UNO_PORT
public static final int DEFAULT_UNO_PORT
Le port par défaut pour accéder à OpenOffice est 8100.- See Also:
- Constant Field Values
-
-
Method Detail
-
storeDocument
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) throws Exception
Ecriture du document.- Parameters:
outputFile
- Fichier de sortiexDoc
- Document OpenOffice sourcetargetFormat
- Format de sortieopenOfficeConnection
- Connection à OpenOffice- Throws:
Exception
- Erreur de traitement
-
loadDocument
protected com.sun.star.lang.XComponent loadDocument(File inputFile, io.vertigo.quarto.plugins.converter.openoffice.OpenOfficeConnection openOfficeConnection) throws Exception
Lecture d'un docuement.- Parameters:
inputFile
- Fichier sourceopenOfficeConnection
- Connection à OpenOffice- Returns:
- Document OpenOffice
- Throws:
Exception
- Erreur de traitement
-
start
public void start()
- Specified by:
start
in interfaceio.vertigo.core.node.component.Activeable
-
stop
public void stop()
- Specified by:
stop
in interfaceio.vertigo.core.node.component.Activeable
-
convertToFormat
public final VFile convertToFormat(VFile file, String targetFormat)
Retourne le fichier converti L'appel à l'OOO distant est synchronisé, car il supporte mal les converssions concurrentes.- Specified by:
convertToFormat
in interfaceConverterPlugin
- Parameters:
file
- Fichier à convertirtargetFormat
- Type de document de sortie ODT,RTF,DOC,CSV,PDF- Returns:
- Fichier converti
-
getFileProperties
protected static final com.sun.star.beans.PropertyValue[] getFileProperties(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType)
Fournit les proterties de fichier pour un format de conversion.- Parameters:
docType
- format- Returns:
- Proterties
-
getFileProperties
protected static final 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.- Parameters:
docType
- docType formatoutputStream
- Flux d'ecriture- Returns:
- Proterties
-
getFileProperties
protected static final 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.- Parameters:
docType
- docType formatinputStream
- Flux de lecture- Returns:
- Proterties
-
getFilterNameFromExtension
protected static final String getFilterNameFromExtension(io.vertigo.quarto.plugins.converter.openoffice.ConverterFormat docType)
- Parameters:
docType
- Format de conversion- Returns:
- filterName géré par OpenOffice pour lui préciser le format de conversion
-
-