org.openoffice.ide.eclipse.core.model.config
Interface IOOo


public interface IOOo

Interface for an OpenOffice.org configuration instance. This can even be implemented as an URE instance.

Author:
cedricbosdo

Method Summary
 boolean canManagePackages()
           
 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 a uno component.
 java.lang.String[] getBinPath()
           Returns the path to any folder containing binaries in the OOo installation.
 java.lang.String[] getClassesPath()
           Returns the path to the OpenOffice.org classes directory.
 java.lang.String getHome()
          Returns the path to the OpenOffice.org home directory.
 java.lang.String getJavaldxPath()
           
 java.lang.String[] getLibsPath()
           Returns the path to the OpenOffice.org shared libraries.
 java.lang.String getName()
          Returns the OOo name.
 java.lang.String[] getServicesPath()
           
 java.lang.String[] getTypesPath()
           
 java.lang.String getUnoPath()
           
 java.lang.String getUnorcPath()
           
 void runOpenOffice(IUnoidlProject pPrj, org.eclipse.debug.core.ILaunch pLaunch, org.eclipse.core.runtime.IPath pUserInstallation, IExtraOptionsProvider pExtraOptionsProvider, org.eclipse.core.runtime.IProgressMonitor pMonitor)
           
 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 the uno executable with the given Main implementation, the arguments and the launcher.
 void setHome(java.lang.String pHome)
          Set the home directory.
 void updatePackage(java.io.File pPackageFile, org.eclipse.core.runtime.IPath pUserInstallation)
          Update a package in the OOo instance if it can manages packages.
 

Method Detail

setHome

void setHome(java.lang.String pHome)
             throws InvalidConfigException
Set 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 an OOo instance. The error code will be InvalidConfigException.INVALID_OOO_HOME

getHome

java.lang.String getHome()
Returns the path to the OpenOffice.org home directory. This string could be passed to the Path constructor to get the folder object.

Returns:
path to the OpenOffice.org home directory.

getName

java.lang.String getName()
Returns the OOo name. It should be a unique identifier

Returns:
ooo name

getClassesPath

java.lang.String[] getClassesPath()

Returns the path to the OpenOffice.org 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 OpenOffice.org classes directory

getLibsPath

java.lang.String[] getLibsPath()

Returns the path to the OpenOffice.org shared libraries. This string could be passed to the Path constructor to get the folder object.

Returns:
path to the OpenOffice.org libraries directory

getBinPath

java.lang.String[] getBinPath()

Returns the path to any folder containing binaries in the OOo installation. This string could be passed to the Path constructor to get the folder object.

Returns:
paths to the OpenOffice.org binary directories

getTypesPath

java.lang.String[] getTypesPath()
Returns:
the path to the types.rdb file of the OOo or URE instance.

getServicesPath

java.lang.String[] getServicesPath()
Returns:
the path to the services.rdb file of the OOo 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 javaldx executable

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 a uno component.

Parameters:
pImplementationName - the name of the component implementation to run
pLibLocation - the name of the library containing the implementation
pRegistriesPaths - the path to the additional registries
pArgs - the argument for the component launch
Returns:
the command to execute the uno binary

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 the uno executable with the given Main implementation, the arguments and the launcher.

Parameters:
pPrj - the project to run
pMain - the main implementation
pArgs - the argument to pass to the main implementation
pLaunch - the launcher
pMonitor - a monitor to follow the progress

runOpenOffice

void runOpenOffice(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 run
pLaunch - the launcher to which we'll add our processes
pUserInstallation - 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:
true if the OOo instance has a package manager.

updatePackage

void updatePackage(java.io.File pPackageFile,
                   org.eclipse.core.runtime.IPath pUserInstallation)
Update a package in the OOo instance if it can manages packages.

Parameters:
pPackageFile - the package to add or update
pUserInstallation - path to the user profile folder.