LibreOffice
LibreOffice 6.2 SDK API Reference
Exported Interfaces | Public Member Functions | List of all members
XPackage Interface Reference

Objects of this interface reflect a bound package and are issued by a PackageRegistryBackend. More...

import"XPackage.idl";

Inheritance diagram for XPackage:
XComponent XModifyBroadcaster XInterface XInterface

Exported Interfaces

interface com::sun::star::lang::XComponent
 implemented to notify that the package has been removed More...
 
interface com::sun::star::util::XModifyBroadcaster
 notifies changes of the registration state of the package More...
 

Public Member Functions

com::sun::star::task::XAbortChannel createAbortChannel ()
 creates a command channel to be used to asynchronously abort a command. More...
 
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)
 checks if the package can be installed. More...
 
boolean checkDependencies ([in] com::sun::star::ucb::XCommandEnvironment xCmdEnv) raises (DeploymentException, ExtensionRemovedException, com::sun::star::ucb::CommandFailedException)
 checks if the dependencies for this package are still satisfied More...
 
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)
 determines whether the package is currently registered, i.e. More...
 
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)
 registers this XPackage. More...
 
void revokePackage ([in] boolean startup, [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)
 revokes this XPackage. More...
 
boolean isBundle ()
 reflects whether this package is a bundle of one or more packages, e.g. More...
 
sequence< XPackagegetBundle ([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)
 Gets packages of the bundle. More...
 
string getName ()
 returns the file name of the package. More...
 
com::sun::star::beans::Optional< string > getIdentifier ()
 returns the unique extension identifier. More...
 
string getVersion () raises (ExtensionRemovedException)
 returns the textual version representation of the package. More...
 
string getURL ()
 returns the location of the package. More...
 
string getDisplayName () raises (ExtensionRemovedException)
 returns the display name of the package, e.g. More...
 
string getDescription () raises (ExtensionRemovedException)
 returns a description string to describe the package. More...
 
string getLicenseText () raises (DeploymentException, ExtensionRemovedException)
 returns a string containing the license text. More...
 
sequence< string > getUpdateInformationURLs () raises (ExtensionRemovedException)
 returns a sequence of update information URLs. More...
 
::com::sun::star::beans::StringPair getPublisherInfo () raises (ExtensionRemovedException)
 returns the publisher info for the package, the strings might be empty, if there is no publisher More...
 
XPackageTypeInfo getPackageType ()
 returns the XPackageTypeInfo, e.g. More...
 
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, com::sun::star::ucb::ContentCreationException)
 exports package to given destination URL. More...
 
com::sun::star::graphic::XGraphic getIcon ([in] boolean highContrast) raises (ExtensionRemovedException)
 returns an icon for a package. More...
 
string getRepositoryName ()
 returns the name of the repository where this object comes from. More...
 
com::sun::star::beans::Optional< string > getRegistrationDataURL () raises (DeploymentException, ExtensionRemovedException)
 return a URL to a directory which contains the registration data. More...
 
boolean isRemoved ()
 indicates if this object represents a removed extension or extension item. More...
 
- Public Member Functions inherited from XComponent
void dispose ()
 The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
 
void addEventListener ([in] XEventListener xListener)
 adds an event listener to the object. More...
 
void removeEventListener ([in] XEventListener aListener)
 removes an event listener from the listener list. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 
- Public Member Functions inherited from XModifyBroadcaster
void addModifyListener ([in] com::sun::star::util::XModifyListener aListener)
 adds the specified listener to receive events "modified." More...
 
void removeModifyListener ([in] com::sun::star::util::XModifyListener aListener)
 removes the specified listener. More...
 

Detailed Description

Objects of this interface reflect a bound package and are issued by a PackageRegistryBackend.

Since
OOo 2.0

Exported Interfaces

implemented to notify that the package has been removed

notifies changes of the registration state of the package

Member Function Documentation

checks if the dependencies for this package are still satisfied

After updating the OpenOffice.org, some dependencies for packages might no longer be satisfied.

Since
OOo 3.2
Parameters
xCmdEnvcommand environment for error handling and other interaction.
Returns
TRUE - all dependencies are satisfied FALSE - at least one dependency failed.

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 hard disk.

Parameters
xAbortChannelabort channel to asynchronously abort the registration process, or NULL
xCmdEnvcommand environment for error handling and other interaction.
alreadyInstalledindicates that an extension with the same identifier is already installed.
Returns
NULL - all prerequisites are met. Otherwise, a value from Prerequisites indicating what prerequisites are missing.
com::sun::star::task::XAbortChannel createAbortChannel ( )

creates a command channel to be used to asynchronously abort a command.

Returns
abort channel
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,
com::sun::star::ucb::ContentCreationException
)

exports package to given destination URL.

Parameters
destFolderURLpackage destination folder URL, must be UCB conforming
newTitlenew package name
nameClashActionone of com::sun::star::ucb::NameClash
xCmdEnvcommand environment for error and progress handling

Gets packages of the bundle.

If isRemoved() returns TRUE then getBundle may return an empty sequence in case the object is not registered.

Parameters
xAbortChannelabort channel to asynchronously abort the registration process, or NULL
xCmdEnvcommand environment for error and progress handling
Returns
set of packages enclosed in this package
string getDescription ( )
raises (ExtensionRemovedException
)

returns a description string to describe the package.

Returns
description
string getDisplayName ( )
raises (ExtensionRemovedException
)

returns the display name of the package, e.g.

for graphical user interfaces (GUI).

Returns
display name of the package
com::sun::star::graphic::XGraphic getIcon ( [in] boolean  highContrast)
raises (ExtensionRemovedException
)

returns an icon for a package.

Parameters
highContrastreturn 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.
com::sun::star::beans::Optional<string> getIdentifier ( )

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
string getLicenseText ( )
raises (DeploymentException,
ExtensionRemovedException
)

returns a string containing the license text.

Returns
license
string getName ( )

returns the file name of the package.

Returns
file name of the package
XPackageTypeInfo getPackageType ( )

returns the XPackageTypeInfo, e.g.

media-type etc.

Returns
media type of package

returns the publisher info for the package, the strings might be empty, if there is 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.

com::sun::star::beans::Optional<string> getRegistrationDataURL ( )
raises (DeploymentException,
ExtensionRemovedException
)

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.

string getRepositoryName ( )

returns the name of the repository where this object comes from.

sequence<string> getUpdateInformationURLs ( )
raises (ExtensionRemovedException
)

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
string getURL ( )

returns the location of the package.

Returns
location of package
string getVersion ( )
raises (ExtensionRemovedException
)

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
boolean 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.

Returns
TRUE if this package is a package bundle, FALSE otherwise
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
)

determines whether the package is currently registered, i.e.

whether it is active.

Parameters
xAbortChannelabort channel to asynchronously abort the registration process, or NULL
xCmdEnvcommand 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.
boolean 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().

registers this XPackage.

NEVER call this directly. This is done by the extension manager if necessary.

Parameters
startupindicates that registration is adapted to the particular startup scenario. That is, it is set to TRUE, when called from XExtensionManager::synchronize()
xAbortChannelabort channel to asynchronously abort the registration process, or NULL
xCmdEnvcommand environment for error and progress handling

revokes this XPackage.

NEVER call this directly. This is done by the extension manager if necessary.

Parameters
startupindicates that registration is adapted to the particular startup scenario. That is, it is set to TRUE, when called from XExtensionManager::synchronize()
xAbortChannelabort channel to asynchronously abort the registration process, or NULL
xCmdEnvcommand environment for error and progress handling

The documentation for this interface was generated from the following file: