Interface IOOo
-
public interface IOOoInterface for a LibreOffice configuration instance. This can even be implemented as an URE instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanManagePackages()java.lang.StringcreateUnoCommand(java.lang.String pImplementationName, java.lang.String pLibLocation, java.lang.String[] pRegistriesPaths, java.lang.String[] pArgs)Returns a command to execute aunocomponent.java.lang.String[]getBinPath()Returns the path to any folder containing binaries in the LibreOffice installation.java.lang.String[]getClassesPath()Returns the path to the LibreOffice classes directory.java.lang.StringgetHome()Returns the path to the LibreOffice home directory.java.lang.StringgetJavaldxPath()java.lang.String[]getLibsPath()Returns the path to the LibreOffice shared libraries.java.lang.StringgetName()Returns the LibreOffice name.java.lang.String[]getServicesPath()java.lang.String[]getTypesPath()java.lang.StringgetUnoPath()java.lang.StringgetUnorcPath()voidrunOffice(IUnoidlProject pPrj, org.eclipse.debug.core.ILaunch pLaunch, org.eclipse.core.runtime.IPath pUserInstallation, IExtraOptionsProvider pExtraOptionsProvider, org.eclipse.core.runtime.IProgressMonitor pMonitor)voidrunUno(IUnoidlProject pPrj, java.lang.String pMain, java.lang.String pArgs, org.eclipse.debug.core.ILaunch pLaunch, org.eclipse.core.runtime.IProgressMonitor pMonitor)Run theunoexecutable with the given Main implementation, the arguments and the launcher.voidsetHome(java.lang.String pHome)Set the home directory.voidupdatePackage(java.io.File pPackageFile, org.eclipse.core.runtime.IPath pUserInstallation)Update a package in the LibreOffice instance if it can manages packages.
-
-
-
Method Detail
-
setHome
void setHome(java.lang.String pHome) throws InvalidConfigExceptionSet the home directory.- Parameters:
pHome- the absolute path to the home directory- Throws:
InvalidConfigException- is thrown if the path doesn't match the implementation requirement for a LibreOffice instance. The error code will beInvalidConfigException.INVALID_OOO_HOME
-
getHome
java.lang.String getHome()
Returns the path to the LibreOffice home directory. This string could be passed to the Path constructor to get the folder object.- Returns:
- path to the LibreOffice home directory.
-
getName
java.lang.String getName()
Returns the LibreOffice name. It should be a unique identifier- Returns:
- LibreOffice name
-
getClassesPath
java.lang.String[] getClassesPath()
Returns the path to the LibreOffice classes directory. These strings could be passed to the Path constructor to get the folder object.
This method should be used for future compatibility with URE applications
- Returns:
- path to the LibreOffice classes directory
-
getLibsPath
java.lang.String[] getLibsPath()
Returns the path to the LibreOffice shared libraries. This string could be passed to the Path constructor to get the folder object.
- Returns:
- path to the LibreOffice libraries directory
-
getBinPath
java.lang.String[] getBinPath()
Returns the path to any folder containing binaries in the LibreOffice installation. This string could be passed to the Path constructor to get the folder object.
- Returns:
- paths to the LibreOffice binary directories
-
getTypesPath
java.lang.String[] getTypesPath()
- Returns:
- the path to the
types.rdbfile of the LibreOffice or URE instance.
-
getServicesPath
java.lang.String[] getServicesPath()
- Returns:
- the path to the
services.rdbfile of the LibreOffice or URE instance.
-
getUnorcPath
java.lang.String getUnorcPath()
- Returns:
- the path to the UNO bootstrap properties file.
-
getUnoPath
java.lang.String getUnoPath()
- Returns:
- the path to the UNO executable file
-
getJavaldxPath
java.lang.String getJavaldxPath()
- Returns:
- the path to the
javaldxexecutable
-
createUnoCommand
java.lang.String createUnoCommand(java.lang.String pImplementationName, java.lang.String pLibLocation, java.lang.String[] pRegistriesPaths, java.lang.String[] pArgs)Returns a command to execute aunocomponent.- Parameters:
pImplementationName- the name of the component implementation to runpLibLocation- the name of the library containing the implementationpRegistriesPaths- the path to the additional registriespArgs- the argument for the component launch- Returns:
- the command to execute the
unobinary
-
runUno
void runUno(IUnoidlProject pPrj, java.lang.String pMain, java.lang.String pArgs, org.eclipse.debug.core.ILaunch pLaunch, org.eclipse.core.runtime.IProgressMonitor pMonitor)
Run theunoexecutable with the given Main implementation, the arguments and the launcher.- Parameters:
pPrj- the project to runpMain- the main implementationpArgs- the argument to pass to the main implementationpLaunch- the launcherpMonitor- a monitor to follow the progress
-
runOffice
void runOffice(IUnoidlProject pPrj, org.eclipse.debug.core.ILaunch pLaunch, org.eclipse.core.runtime.IPath pUserInstallation, IExtraOptionsProvider pExtraOptionsProvider, org.eclipse.core.runtime.IProgressMonitor pMonitor)
- Parameters:
pPrj- the project to runpLaunch- the launcher to which we'll add our processespUserInstallation- the userInstallation folder to use. If null we'll go with the default system one.pExtraOptionsProvider- provider for extra env variables to be set before launching.pMonitor- a monitor to follow the progress
-
canManagePackages
boolean canManagePackages()
- Returns:
trueif the LibreOffice instance has a package manager.
-
updatePackage
void updatePackage(java.io.File pPackageFile, org.eclipse.core.runtime.IPath pUserInstallation)Update a package in the LibreOffice instance if it can manages packages.- Parameters:
pPackageFile- the package to add or updatepUserInstallation- path to the user profile folder.
-
-