Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


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

unpublished interface XPackageRegistry
Usage Restrictions
not published
Description
Interface to bind an UNO package.
Since
OOo 2.0

Methods' Summary
bindPackage binds a package URL to a XPackage handle. The returned UNO package handle ought to late-initialize itself, thus the process of binding must not be an expensive operation, because it is not abortable. Calling the function several time with the same parameters must result in returning the same object. The file or folder at the location where url points to may not exist or it was replaced. This can happen, for example, when a bundled extension was removed by the setup and a user later starts OOo. Then the user data may still contain all registration data of that extension, but the actual extension files do not exist anymore. The registration data must then be cleaned of all the remains of that extension. To to that one creates an XPackage object on behalf of that extension and calls XPackage::revokePakage. The parameter removed indicates this case. The returned object may not rely on the file or folder to which refers url. Instead it must use previously saved data to successfully carry out the revocation of this object (XPackage::revokePackage). The implementation must ensure that there is only one instance of XPackage for the same url at any time. Therefore calling bindPackage again with the same url but different mediaType (the exeption is, if previsously an empty string was proveded to cause the determination of the media type) or removed parameters will cause an exception. An ::com::sun::star::lang::IllegalArgumentException will be thrown in case of a different mediaType parameter and a InvalidRemovedParameterException is thrown if the removed parameter is different. The identifier parameter must be provided when removed = true. If not, then an ::com::sun::star::lang::IllegalArgumentException will be thrown.  
getSupportedPackageTypes gets the supported XPackageTypeInfos.  
packageRemoved  
Methods' Details
bindPackage
XPackage
bindPackage( [in] string  url,
[in] string  mediaType,
[in] boolean  removed,
[in] string  identifier,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
InvalidRemovedParameterException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::lang::IllegalArgumentException );

Description
binds a package URL to a XPackage handle. The returned UNO package handle ought to late-initialize itself, thus the process of binding must not be an expensive operation, because it is not abortable. Calling the function several time with the same parameters must result in returning the same object. The file or folder at the location where url points to may not exist or it was replaced. This can happen, for example, when a bundled extension was removed by the setup and a user later starts OOo. Then the user data may still contain all registration data of that extension, but the actual extension files do not exist anymore. The registration data must then be cleaned of all the remains of that extension. To to that one creates an XPackage object on behalf of that extension and calls XPackage::revokePakage. The parameter removed indicates this case. The returned object may not rely on the file or folder to which refers url. Instead it must use previously saved data to successfully carry out the revocation of this object (XPackage::revokePackage). The implementation must ensure that there is only one instance of XPackage for the same url at any time. Therefore calling bindPackage again with the same url but different mediaType (the exeption is, if previsously an empty string was proveded to cause the determination of the media type) or removed parameters will cause an exception. An ::com::sun::star::lang::IllegalArgumentException will be thrown in case of a different mediaType parameter and a InvalidRemovedParameterException is thrown if the removed parameter is different. The identifier parameter must be provided when removed = true. If not, then an ::com::sun::star::lang::IllegalArgumentException will be thrown.
Parameter url
package URL, must be UCB conform
Parameter mediaType
media type of package, empty string if to be detected
Parameter removed
@para unfulfilledPrerequisites has a value other null if the extension could not be installed previously because XPackage::checkPrerequisites failed.
Parameter identifier
the identifier of the extension
Parameter xCmdEnv
command environment for error and progress handling
Returns
XPackage handle
getSupportedPackageTypes
sequence< XPackageTypeInfo >
getSupportedPackageTypes();

Description
gets the supported XPackageTypeInfos.
Returns
supported XPackageTypeInfos.
packageRemoved
void
packageRemoved( [in] string  url,
[in] string  mediaType )
raises( DeploymentException,
::com::sun::star::lang::IllegalArgumentException );

Top of Page

Apache Software Foundation

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

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