Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: com :: sun :: star :: deployment ::

unpublished interface XExtensionManager
Base Interfaces
XExtensionManager
┣ ::com::sun::star::lang::XComponent
┗ ::com::sun::star::util::XModifyBroadcaster

::com::sun::star::lang::XComponent
Description
interface to notify disposing
::com::sun::star::util::XModifyBroadcaster
Description
interface to notify changes of the set of deployed packages of this manager
Usage Restrictions
not published
Description
The XExtensionManager interface is used to manage extensions in the user, shared and bundled repository.
Since
OOo 3.3
See also
ExtensionManager

Methods' Summary
getSupportedPackageTypes gets the supported XPackageTypeInfos.  
createAbortChannel creates a command channel to be used to asynchronously abort a command.  
addExtension adds an extension. The properties argument is currently only used to suppress the license information for shared extensions.  
removeExtension removes an extension.  
enableExtension enable an extension. If the extension is not from the user repository then an IllegalArgumentException is thrown.  
disableExtension disable an extension. If the extension is not from the user repository then an IllegalArgumentException is thrown.  
getDeployedExtensions gets all currently installed extensions, including disabled user extensions.  
getDeployedExtension gets an installed extensions.  
getExtensionsWithSameIdentifier gets all extensions with the same identifer from all repositories. The extension at the first position in the returned sequence represents the extension from the user repository. The next element is from the shared and the last one is from the bundled repository. If one repository does not contain this extension, then the respective element is a null reference.  
getAllExtensions returns a sequence containing all installed extensions. The members of the returned sequence correspond to an extension with a particular extension identifer. The members are also sequences which contain as many elements as there are repositories. Those are ordered according to the priority of the repository. That is, the first member is the extension from the user repository, the second is from the shared repository and the last is from the bundled repository.  
reinstallDeployedExtensions Expert feature: erases the underlying registry cache and reinstalls all previously added extensions. Please keep in mind that all registration status get lost.  
synchronize synchronizes the extension database with the contents of the extensions folder of shared and bundled extensinos. Added extensions will be added to the database and removed extensions will be removed from the database. The active extensions are determined. That is, shared or bundled extensions are not necessaryly registered (XPackage::registerPackage).  
synchronizeBundledPrereg synchronizes the special bundled_prereg repository, which is based on the bundled extensions and has its registration data folder at $BUNDLED_EXTENSIONS_PREREG (for example openoffice.org3/share/prereg). All bundled extensions are registered (XPackage::registerPackage). The active extensions are NOT determined, because this function only works with bundled extensions. This function is intended to be called during the installation of OOo. OOo will copy parts of the registration data folder to the user installation at the first startup.  
getExtensionsWithUnacceptedLicenses returns all extensions which are currently not in use because the user did not accept the license. The function will not return any object for the user repository, because a user extension will not be kept in the user repository if its license is declined. Only extensions which are registered at start-up of OOo, that is, shared and bundled extensions, can be returned. Extensions which allow the license to be suppressed, that is, it does not need to be displayed, and which are installed with the corresponding option, are also not returned. Extensions returned by this functions are not returned by ::XExtensionManger::getDeployedExtension ::XExtensionManger::getDeployedExtensions ::XExtensionManger::getAllExtensions ::XExtensionManger::getExtensionsWithSameIdentifier  
checkPrerequisitesAndEnable check if all prerequisites for the extension are fulfilled and activates it, if possible.  
isReadOnlyRepository determines if the current user has write access to the extensions folder of the repository.  
Methods' Details
getSupportedPackageTypes
sequence< XPackageTypeInfo >
getSupportedPackageTypes();

Description
gets the supported XPackageTypeInfos.
Returns
supported XPackageTypeInfos.
createAbortChannel
::com::sun::star::task::XAbortChannel
createAbortChannel();

Description
creates a command channel to be used to asynchronously abort a command.
Returns
abort channel
addExtension
XPackage
addExtension( [in] string  url,
[in] sequence< ::com::sun::star::beans::NamedValue >  properties,
[in] string  repository,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
adds an extension. The properties argument is currently only used to suppress the license information for shared extensions.
Parameter url
package URL, must be UCB conform
Parameter properties
additional properties, for example, that the license is to be suppressed (if supported by the extension)
Parameter repository
the name of the repository
Parameter xAbortChannel
abort channel to asynchronously abort the adding process, or null
Parameter xCmdEnv
command environment for error and progress handling
Returns
object representing the extension.
removeExtension
void
removeExtension( [in] string  identifier,
[in] string  fileName,
[in] string  repository,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
removes an extension.
Parameter identifier
package identifier
Parameter fileName
package file name
Parameter repository
the name of the repository
Parameter xAbortChannel
abort channel to asynchronously abort the removing process, or null
Parameter xCmdEnv
command environment for error and progress handling
enableExtension
void
enableExtension( [in] XPackage  extension,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
enable an extension. If the extension is not from the user repository then an IllegalArgumentException is thrown.
Parameter extension
the extension which is to be enabled.
Parameter xAbortChannel
abort channel to asynchronously abort the removing process, or null
Parameter xCmdEnv
command environment for error and progress handling
disableExtension
void
disableExtension( [in] XPackage  extension,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
disable an extension. If the extension is not from the user repository then an IllegalArgumentException is thrown.
Parameter extension
the extension which is to be disabled
Parameter xAbortChannel
abort channel to asynchronously abort the removing process, or null
Parameter xCmdEnv
command environment for error and progress handling
getDeployedExtensions
sequence< XPackage >
getDeployedExtensions( [in] string  repository,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
gets all currently installed extensions, including disabled user extensions.
Parameter repository
the repository from which the extensions are returned
Parameter xAbortChannel
abort channel to asynchronously abort the removing process, or null
Parameter xCmdEnv
command environment for error and progress handling
Returns
all currently installed packages
getDeployedExtension
XPackage
getDeployedExtension( [in] string  repository,
[in] string  identifier,
[in] string  fileName,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::lang::IllegalArgumentException );

Description
gets an installed extensions.
Parameter repositroy
the name of the repository
Parameter identifier
extension identifier
Parameter fileName
extension file name
Parameter xCmdEnv
command environment for error and progress handling
Returns
XPackage object
getExtensionsWithSameIdentifier
sequence< XPackage >
getExtensionsWithSameIdentifier( [in] string  identifier,
[in] string  fileName,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::lang::IllegalArgumentException );

Description
gets all extensions with the same identifer from all repositories. The extension at the first position in the returned sequence represents the extension from the user repository. The next element is from the shared and the last one is from the bundled repository. If one repository does not contain this extension, then the respective element is a null reference.
getAllExtensions
sequence< sequence< XPackage > >
getAllExtensions( [in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
returns a sequence containing all installed extensions. The members of the returned sequence correspond to an extension with a particular extension identifer. The members are also sequences which contain as many elements as there are repositories. Those are ordered according to the priority of the repository. That is, the first member is the extension from the user repository, the second is from the shared repository and the last is from the bundled repository.
reinstallDeployedExtensions
void
reinstallDeployedExtensions( [in] string  repository,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
Expert feature: erases the underlying registry cache and reinstalls all previously added extensions. Please keep in mind that all registration status get lost.

Please use this in case of suspected cache inconsistencies only.

Parameter repositroy
the name of the repository
Parameter xAbortChannel
abort channel to asynchronously abort the adding process
Parameter xCmdEnv
command environment for error and progress handling
synchronize
boolean
synchronize( [in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
synchronizes the extension database with the contents of the extensions folder of shared and bundled extensinos. Added extensions will be added to the database and removed extensions will be removed from the database. The active extensions are determined. That is, shared or bundled extensions are not necessaryly registered (XPackage::registerPackage).
Returns
If true - then at least one extension was removed or added. Otherwise nothing was chaned.
synchronizeBundledPrereg
void
synchronizeBundledPrereg( [in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException );

Description
synchronizes the special bundled_prereg repository, which is based on the bundled extensions and has its registration data folder at $BUNDLED_EXTENSIONS_PREREG (for example openoffice.org3/share/prereg). All bundled extensions are registered (XPackage::registerPackage). The active extensions are NOT determined, because this function only works with bundled extensions. This function is intended to be called during the installation of OOo. OOo will copy parts of the registration data folder to the user installation at the first startup.
getExtensionsWithUnacceptedLicenses
sequence< XPackage >
getExtensionsWithUnacceptedLicenses( [in] string  repository,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::lang::IllegalArgumentException );

Description
returns all extensions which are currently not in use because the user did not accept the license. The function will not return any object for the user repository, because a user extension will not be kept in the user repository if its license is declined. Only extensions which are registered at start-up of OOo, that is, shared and bundled extensions, can be returned. Extensions which allow the license to be suppressed, that is, it does not need to be displayed, and which are installed with the corresponding option, are also not returned. Extensions returned by this functions are not returned by ::XExtensionManger::getDeployedExtension ::XExtensionManger::getDeployedExtensions ::XExtensionManger::getAllExtensions ::XExtensionManger::getExtensionsWithSameIdentifier
checkPrerequisitesAndEnable
long
checkPrerequisitesAndEnable( [in] XPackage  extension,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
check if all prerequisites for the extension are fulfilled and activates it, if possible.
isReadOnlyRepository
boolean
isReadOnlyRepository( [in] string  repository );

Description
determines if the current user has write access to the extensions folder of the repository.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.