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 XPackage
Base Interfaces
XPackage
┣ ::com::sun::star::lang::XComponent
┗ ::com::sun::star::util::XModifyBroadcaster

::com::sun::star::lang::XComponent
Description
implemented to notify that the package has been removed
::com::sun::star::util::XModifyBroadcaster
Description
notifies changes of the registration state of the package
Usage Restrictions
not published
Description
Objects of this interface reflect a bound package and are issued by a PackageRegistryBackend.
Since
OOo 2.0

Methods' Summary
createAbortChannel creates a command channel to be used to asynchronously abort a command.  
checkPrerequisites checks if the package can be installed. Only if the return value is true the package is allowed to be installed. In case of false or in case of an exception, the package must be removed completely. After return of this function no code from the extension may be used anymore, so that the extension can be safely removed from the harddisk.  
checkDependencies checks if the dependencies for this package are still satisfied After updateing the OpenOffice.org, some dependencies for packages might no longer be satisfied.  
isRegistered determines whether the package is currently is registered, i.e. whether it is active.  
registerPackage registers this XPackage. NEVER call this directly. This is done by the extension manager if necessary.  
revokePackage revokes this XPackage. NEVER call this directly. This is done by the extension manager if necessary.  
isBundle reflects whether this package is a bundle of one or more packages, e.g. a zip (legacy) package file or a document hosting script packages.  
getBundle Gets packages of the bundle. If isRemoved returns true then getBundle may return an empty sequence in case the object is not registered.  
getName returns the file name of the package.  
getIdentifier returns the unique extension identifier.  
getVersion returns the textual version representation of the package. A textual version representation is a finite string following the BNF
version ::= [element ("." element)*]
element ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+  
getURL returns the location of the package.  
getDisplayName returns the display name of the package, e.g. for graphical user interfaces (GUI).  
getDescription returns a description string to describe the package.  
getLicenseText returns a string containing the license text.  
getUpdateInformationURLs returns a sequence of update information URLs. The sequence may be empty in case no update information is available. If the sequence contains more than one URL, the extra URLs must mirror the information available at the first URL.  
getPublisherInfo returns the publisher info for a package, the strings might be empty, if there are no publisher ::com::sun::star::beans::StringPair::First represents the publisher name and ::com::sun::star::beans::StringPair::Second represents the URL to the publisher.  
getPackageType returns the XPackageTypeInfo, e.g. media-type etc.  
exportTo exports package to given destination URL.  
getIcon returns an icon for a package.  
getRepositoryName returns the name of the repository where this object comes from.  
getRegistrationDataURL return a URL to a directory which contains the registration data. This data may be created when calling XPackage::registerPackage. If this is the case is indicated by ::com::sun::star::beans::Optional::IsPresent of the return value. If registration data are created during registration, but the package is currently not registered, for example after calling XPackage::revokePackage, then ::com::sun::star::beans::Optional::IsPresent is true and the ::com::sun::star::beans::Optional::Value may be an empty string.  
isRemoved indicates if this object represents a removed extension or extension item. This is the case when it was created by providing true for the removed parameter in the function XPackageRegistry::bindPackage.  
Methods' Details
createAbortChannel
::com::sun::star::task::XAbortChannel
createAbortChannel();

Description
creates a command channel to be used to asynchronously abort a command.
Returns
abort channel
checkPrerequisites
long
checkPrerequisites( [in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv,
[in] boolean  alreadyInstalled )
raises( DeploymentException,
ExtensionRemovedException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException );

Description
checks if the package can be installed. Only if the return value is true the package is allowed to be installed. In case of false or in case of an exception, the package must be removed completely. After return of this function no code from the extension may be used anymore, so that the extension can be safely removed from the harddisk.
Parameter xCmdEnv
command environment for error handling and other interaction. @alreadyInstalled indicates that an extension with the same identifyer is already installed.
Returns
null - all prerequisites are met. Otherwise, a value from Prerequisites indicating what prerequisites are missing.
checkDependencies
boolean
checkDependencies( [in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
ExtensionRemovedException,
::com::sun::star::ucb::CommandFailedException );

Description
checks if the dependencies for this package are still satisfied After updateing the OpenOffice.org, some dependencies for packages might no longer be satisfied.
Since
OOo 3.2
Parameter xCmdEnv
command environment for error handling and other interaction.
Returns
true - all dependencies are satisfied false - at least one dependency failed.
isRegistered
::com::sun::star::beans::Optional< ::com::sun::star::beans::Ambiguous< boolean > >
isRegistered( [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 );

Description
determines whether the package is currently is registered, i.e. whether it is active.
Parameter xAbortChannel
abort channel to asynchronously abort the registration process, or null
Parameter xCmdEnv
command environment for error and progress handling
Returns
status whether the package is registered (true, false) or the status is ambiguous. Additionally, a registration status may not apply, e.g. in case of an empty package bundle.
registerPackage
void
registerPackage( [in] boolean  startup,
[in] ::com::sun::star::task::XAbortChannel  xAbortChannel,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( DeploymentException,
ExtensionRemovedException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException,
::com::sun::star::lang::IllegalArgumentException );

Description
registers this XPackage. NEVER call this directly. This is done by the extension manager if necessary.
Parameter startup
indicates that registration is adapted to the particular startup scenario. That is, it is set to true, when called from XExtensionManager::synchronize
Parameter xAbortChannel
abort channel to asynchronously abort the registration process, or null
Parameter xCmdEnv
command environment for error and progress handling
revokePackage
void
revokePackage( [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
revokes this XPackage. NEVER call this directly. This is done by the extension manager if necessary.
Parameter xAbortChannel
abort channel to asynchronously abort the registration process, or null
Parameter xCmdEnv
command environment for error and progress handling
isBundle
boolean
isBundle();

Description
reflects whether this package is a bundle of one or more packages, e.g. a zip (legacy) package file or a document hosting script packages.
Returns
in case this package relfects a package bundle
getBundle
sequence< XPackage >
getBundle( [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 packages of the bundle. If isRemoved returns true then getBundle may return an empty sequence in case the object is not registered.
Parameter xAbortChannel
abort channel to asynchronously abort the registration process, or null
Parameter xCmdEnv
command environment for error and progress handling
Returns
set of packages enclosed in this package
getName
string
getName();

Description
returns the file name of the package.
Returns
file name of the package
getIdentifier
::com::sun::star::beans::Optional< ::com::sun::star::beans::Ambiguous< boolean > >
getIdentifier();

Description
returns the unique extension identifier.
Returns
the extension identifier (a "org.openoffice.legacy." one if the extension does not explicitly specify one), or an empty Optional if this package does not represent an extension
getVersion
string
getVersion()
raises( ExtensionRemovedException );

Description
returns the textual version representation of the package. A textual version representation is a finite string following the BNF
version ::= [element ("." element)*]
element ::= ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9")+
Returns
the textual version representation
getURL
string
getURL();

Description
returns the location of the package.
Returns
location of package
getDisplayName
string
getDisplayName()
raises( ExtensionRemovedException );

Description
returns the display name of the package, e.g. for graphical user interfaces (GUI).
Returns
display name of the package
getDescription
string
getDescription()
raises( ExtensionRemovedException );

Description
returns a description string to describe the package.
Returns
description
getLicenseText
string
getLicenseText()
raises( ExtensionRemovedException );

Description
returns a string containing the license text.
Returns
license
getUpdateInformationURLs
sequence< string >
getUpdateInformationURLs()
raises( ExtensionRemovedException );

Description
returns a sequence of update information URLs. The sequence may be empty in case no update information is available. If the sequence contains more than one URL, the extra URLs must mirror the information available at the first URL.
Returns
update information URLs
getPublisherInfo
::com::sun::star::beans::StringPair
getPublisherInfo()
raises( ExtensionRemovedException );

Description
returns the publisher info for a package, the strings might be empty, if there are no publisher ::com::sun::star::beans::StringPair::First represents the publisher name and ::com::sun::star::beans::StringPair::Second represents the URL to the publisher.
getPackageType
XPackageTypeInfo
getPackageType();

Description
returns the XPackageTypeInfo, e.g. media-type etc.
Returns
media type of package
exportTo
void
exportTo( [in] string  destFolderURL,
[in] string  newTitle,
[in] long  nameClashAction,
[in] ::com::sun::star::ucb::XCommandEnvironment  xCmdEnv )
raises( ExtensionRemovedException,
::com::sun::star::ucb::CommandFailedException,
::com::sun::star::ucb::CommandAbortedException );

Description
exports package to given destination URL.
Parameter destFolderURL
package destination folder URL, must be UCB conform
Parameter newTitle
new package name
Parameter nameClashAction
one of ::com::sun::star::ucb::NameClash
Parameter xCmdEnv
command environment for error and progress handling
getIcon
::com::sun::star::graphic::XGraphic
getIcon( [in] boolean  highContrast )
raises( ExtensionRemovedException );

Description
returns an icon for a package.
Parameter highContrast
return high contrast icon
Returns
the icon which should be used to represent the table in the database application window, or NULL if the default icon should be used.
getRepositoryName
string
getRepositoryName();

Description
returns the name of the repository where this object comes from.
getRegistrationDataURL
::com::sun::star::beans::Optional< ::com::sun::star::beans::Ambiguous< boolean > >
getRegistrationDataURL()
raises( ExtensionRemovedException );

Description
return a URL to a directory which contains the registration data. This data may be created when calling XPackage::registerPackage. If this is the case is indicated by ::com::sun::star::beans::Optional::IsPresent of the return value. If registration data are created during registration, but the package is currently not registered, for example after calling XPackage::revokePackage, then ::com::sun::star::beans::Optional::IsPresent is true and the ::com::sun::star::beans::Optional::Value may be an empty string.
isRemoved
boolean
isRemoved();

Description
indicates if this object represents a removed extension or extension item. This is the case when it was created by providing true for the removed parameter in the function XPackageRegistry::bindPackage.
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.