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

unpublished interface XPackageManager
Base Interfaces
XPackageManager
┣ ::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
Description
The XPackageManager interface is used to add or remove packages to a specific deployment context. Packages are deployable files, e.g. scripts or UNO components.

Adding an UNO package means that a copy of the package is stored with respect to the context of the manager and the package is registered, thus activated.

Removing an UNO package means that the previously added package is revoked, thus deactivated, first and then removed from the context.

Objects of this interface are created using the XPackageManagerFactory service resp. the singleton /singletons/com.sun.star.deployment.thePackageManagerFactory .

Since
OpenOffice 2.0

Methods' Summary
getContext returns the underlying deployment context.  
getSupportedPackageTypes gets the supported XPackageTypeInfos.  
createAbortChannel creates a command channel to be used to asynchronously abort a command.  
addPackage adds an UNO package.  
removePackage removes an UNO package.  
getDeployedPackage gets a deployed package.  
getDeployedPackages gets all currently deployed packages.  
reinstallDeployedPackages Expert feature: erases the underlying registry cache and reinstalls all previously added packages. Please keep in mind that all registration status get lost.  
isReadOnly indicates that this implementation cannot be used for tasks which require write access to the location where the extensions are installed.  
Methods' Details
getContext
string
getContext();

Description
returns the underlying deployment context.
Returns
underlying deployment context
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
addPackage
XPackage
addPackage( [in] string  url,
[in] string  mediaType,
[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 UNO package.
Parameter url
package URL, must be UCB conform
Parameter mediaType
media-type of package, empty string if to be detected
Parameter xAbortChannel
abort channel to asynchronously abort the adding process, or null
Parameter xCmdEnv
command environment for error and progress handling
Returns
XPackage handle
removePackage
void
removePackage( [in] string  identifier,
[in] string  fileName,
[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 UNO package.
Parameter identifier
package identifier
Parameter fileName
package file name
Parameter xAbortChannel
abort channel to asynchronously abort the removing process, or null
Parameter xCmdEnv
command environment for error and progress handling
getDeployedPackage
XPackage
getDeployedPackage( [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 a deployed package.
Parameter identifier
package identifier
Parameter fileName
package file name
Parameter xCmdEnv
command environment for error and progress handling
Returns
XPackage handle
getDeployedPackages
sequence< XPackage >
getDeployedPackages( [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 deployed packages.
Parameter xAbortChannel
abort channel to asynchronously abort the removing process, or null
Parameter xCmdEnv
command environment for error and progress handling
Returns
all currently deployed packages
reinstallDeployedPackages
void
reinstallDeployedPackages( [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 packages. Please keep in mind that all registration status get lost.

Please use this in case of suspected cache inconsistencies only.

Parameter xAbortChannel
abort channel to asynchronously abort the adding process
Parameter xCmdEnv
command environment for error and progress handling
isReadOnly
boolean
isReadOnly();

Description
indicates that this implementation cannot be used for tasks which require write access to the location where the extensions are installed.

Normally one would call a method and handle the exception if writing failed. However, a GUI interface may need to know beforehand if writing is allowed. For example, the Extension Manager dialog needs to enable / disable the Add button depending if the user has write permission. Only the XPackageManager implementation knows the location of the installed extensions. Therefore it is not possible to check "externally" for write permission.

Top of Page