ooodev.adapter.deployment.package_partial module
- class ooodev.adapter.deployment.package_partial.PackagePartial(component, interface=com.sun.star.deployment.XPackage)[source]
Bases:
ModifyBroadcasterPartial
,ComponentPartial
Partial class for XPackage.
- Parameters:
component (XPackage) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.deployment.XPackage)[source]
Constructor
- Parameters:
component (XPackage) – UNO Component that implements
com.sun.star.deployment.XPackage
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XPackage
.
- Return type:
None
- check_dependencies(cmd_env)[source]
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
- Raises:
DeploymentException –
DeploymentException
ExtensionRemovedException –
ExtensionRemovedException
com.sun.star.ucb.CommandFailedException –
CommandFailedException
- Return type:
bool
- Parameters:
cmd_env (com.sun.star.ucb.XCommandEnvironment) –
- check_prerequisites(abort_channel, cmd_env, alreadyInstalled)[source]
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.
- Raises:
DeploymentException –
DeploymentException
ExtensionRemovedException –
ExtensionRemovedException
com.sun.star.ucb.CommandFailedException –
CommandFailedException
com.sun.star.ucb.CommandAbortedException –
CommandAbortedException
- Return type:
int
- Parameters:
abort_channel (com.sun.star.task.XAbortChannel) –
cmd_env (com.sun.star.ucb.XCommandEnvironment) –
alreadyInstalled (bool) –
- create_abort_channel()[source]
Creates a command channel to be used to asynchronously abort a command.
- Return type:
XAbortChannel
- export_to(dest_folder_url, newTitle, name_clash_action, cmd_env)[source]
Exports package to given destination URL.
- Raises:
ExtensionRemovedException –
ExtensionRemovedException
com.sun.star.ucb.CommandFailedException –
CommandFailedException
com.sun.star.ucb.CommandAbortedException –
CommandAbortedException
com.sun.star.ucb.ContentCreationException –
ContentCreationException
- Return type:
None
- Parameters:
dest_folder_url (str) –
newTitle (str) –
name_clash_action (int) –
cmd_env (com.sun.star.ucb.XCommandEnvironment) –
- get_bundle(abort_channel, cmd_env)[source]
Gets packages of the bundle.
If isRemoved() Returns TRUE then getBundle may return an empty sequence in case the object is not registered.
- Raises:
DeploymentException –
DeploymentException
com.sun.star.ucb.CommandFailedException –
CommandFailedException
com.sun.star.ucb.CommandAbortedException –
CommandAbortedException
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentException
- Return type:
Tuple
[XPackage
,...
]- Parameters:
abort_channel (com.sun.star.task.XAbortChannel) –
cmd_env (com.sun.star.ucb.XCommandEnvironment) –
- get_description()[source]
Returns a description string to describe the package.
- Raises:
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
str
- get_display_name()[source]
Returns the display name of the package, e.g.
for graphical user interfaces (GUI).
- Raises:
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
str
- get_icon(high_contrast)[source]
Returns an icon for a package.
- Raises:
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
XGraphic
- Parameters:
high_contrast (bool) –
- get_license_text()[source]
Returns a string containing the license text.
- Raises:
DeploymentException –
DeploymentException
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
str
- get_package_type()[source]
Returns the XPackageTypeInfo, e.g.
media-type etc.
- Return type:
XPackageTypeInfo
- get_publisher_info()[source]
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.
- Raises:
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
StringPair
- get_registration_data_url()[source]
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.
- Raises:
DeploymentException –
DeploymentException
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
Any
- get_repository_name()[source]
Returns the name of the repository where this object comes from.
- Return type:
str
- get_update_information_ur_ls()[source]
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.
- Raises:
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
Tuple
[str
,...
]
- get_version()[source]
Returns the textual version representation of the package.
A textual version representation is a finite string following the
BNFversion .= [element (. element)*]element .= (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9)+
- Raises:
ExtensionRemovedException –
ExtensionRemovedException
- Return type:
str
- is_bundle()[source]
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.
- Return type:
bool
- is_registered(abort_channel, cmd_env)[source]
Determines whether the package is currently registered, i.e.
whether it is active.
- Raises:
DeploymentException –
DeploymentException
com.sun.star.ucb.CommandFailedException –
CommandFailedException
com.sun.star.ucb.CommandAbortedException –
CommandAbortedException
- Return type:
Any
- Parameters:
abort_channel (com.sun.star.task.XAbortChannel) –
cmd_env (com.sun.star.ucb.XCommandEnvironment) –
- is_removed()[source]
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 functionXPackageRegistry.bindPackage()
.- Return type:
bool
- register_package(startup, abort_channel, cmd_env)[source]
Registers this XPackage.
NEVER call this directly. This is done by the extension manager if necessary.
- Raises:
DeploymentException –
DeploymentException
ExtensionRemovedException –
ExtensionRemovedException
com.sun.star.ucb.CommandFailedException –
CommandFailedException
com.sun.star.ucb.CommandAbortedException –
CommandAbortedException
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentException
- Return type:
None
- Parameters:
startup (bool) –
abort_channel (com.sun.star.task.XAbortChannel) –
cmd_env (com.sun.star.ucb.XCommandEnvironment) –
- revoke_package(startup, abort_channel, cmd_env)[source]
revokes this XPackage.
NEVER call this directly. This is done by the extension manager if necessary.
- Raises:
DeploymentException –
DeploymentException
com.sun.star.ucb.CommandFailedException –
CommandFailedException
com.sun.star.ucb.CommandAbortedException –
CommandAbortedException
com.sun.star.lang.IllegalArgumentException –
IllegalArgumentException
- Return type:
None
- Parameters:
startup (bool) –
abort_channel (com.sun.star.task.XAbortChannel) –
cmd_env (com.sun.star.ucb.XCommandEnvironment) –