summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-05-04 12:37:01 +0200
committerJoachim Lingner <jl@openoffice.org>2010-05-04 12:37:01 +0200
commit1ba274302f3404e4ecd8a65108fbf6dd530da780 (patch)
tree9e862d6404a88511ec0d563fa2f46d608ad87c80
parent39ca722d12345ead74d3d28df88564da477c70b6 (diff)
jl152 bundled extensions, import of changeset 263438:8b253e76e957 from native0jl
-rw-r--r--offapi/com/sun/star/deployment/ExtensionManager.idl51
-rw-r--r--offapi/com/sun/star/deployment/InstallException.idl5
-rw-r--r--offapi/com/sun/star/deployment/VersionException.idl10
-rw-r--r--offapi/com/sun/star/deployment/XExtensionManager.idl293
-rw-r--r--offapi/com/sun/star/deployment/XPackage.idl4
-rw-r--r--offapi/com/sun/star/deployment/XPackageManager.idl58
-rw-r--r--offapi/com/sun/star/deployment/XPackageRegistry.idl10
-rw-r--r--offapi/com/sun/star/deployment/makefile.mk2
8 files changed, 421 insertions, 12 deletions
diff --git a/offapi/com/sun/star/deployment/ExtensionManager.idl b/offapi/com/sun/star/deployment/ExtensionManager.idl
new file mode 100644
index 000000000000..81b06acffddd
--- /dev/null
+++ b/offapi/com/sun/star/deployment/ExtensionManager.idl
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#if ! defined INCLUDED_com_sun_star_deployment_ExtensionManagerFactory_idl
+#define INCLUDED_com_sun_star_deployment_ExtensionManagerFactory_idl
+
+#include <com/sun/star/deployment/XExtensionManager.idl>
+
+
+module com { module sun { module star { module deployment {
+
+/** <type>thePackageManagerFactory</type> denotes the one and only
+ <type>XPackageManagerFactory</type> object to be used.
+ <p>
+ The component context entry is
+ <code>
+ /singletons/com.sun.star.deployment.thePackageManagerFactory
+ </code>.
+ </p>
+
+ @since OOo 2.0.0
+*/
+singleton ExtensionManager : XExtensionManager;
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/deployment/InstallException.idl b/offapi/com/sun/star/deployment/InstallException.idl
index 6c16e058b38d..3186ecedbdfc 100644
--- a/offapi/com/sun/star/deployment/InstallException.idl
+++ b/offapi/com/sun/star/deployment/InstallException.idl
@@ -44,11 +44,10 @@ interface XPackage;
*/
exception InstallException: com::sun::star::uno::Exception {
/**
- represents the new deployment unit.
+ the display name of the extension, which is to be installed.
- <p>Must not be <NULL/>.</p>
*/
- XPackage New;
+ string displayName;
};
diff --git a/offapi/com/sun/star/deployment/VersionException.idl b/offapi/com/sun/star/deployment/VersionException.idl
index 74683adab7a0..2d69c918c3a2 100644
--- a/offapi/com/sun/star/deployment/VersionException.idl
+++ b/offapi/com/sun/star/deployment/VersionException.idl
@@ -44,11 +44,13 @@ interface XPackage;
*/
exception VersionException: com::sun::star::uno::Exception {
/**
- represents the new version of the deployment unit.
-
- <p>Must not be <NULL/>.</p>
+ the version of the extension which is being installed.
+ */
+ string NewVersion;
+ /**
+ the display name of the extension which is being installed.
*/
- XPackage New;
+ string NewDisplayName;
/**
represents the already installed version of the deployment unit.
diff --git a/offapi/com/sun/star/deployment/XExtensionManager.idl b/offapi/com/sun/star/deployment/XExtensionManager.idl
new file mode 100644
index 000000000000..18c5a746341d
--- /dev/null
+++ b/offapi/com/sun/star/deployment/XExtensionManager.idl
@@ -0,0 +1,293 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#if ! defined INCLUDED_com_sun_star_deployment_XExtensionManager_idl
+#define INCLUDED_com_sun_star_deployment_XExtensionManager_idl
+
+#include <com/sun/star/lang/XComponent.idl>
+#include <com/sun/star/task/XAbortChannel.idl>
+#include <com/sun/star/util/XModifyBroadcaster.idl>
+#include <com/sun/star/deployment/XPackage.idl>
+#include <com/sun/star/deployment/XPackageTypeInfo.idl>
+#include <com/sun/star/ucb/XCommandEnvironment.idl>
+#include <com/sun/star/deployment/DeploymentException.idl>
+#include <com/sun/star/container/NoSuchElementException.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+
+
+module com { module sun { module star { module deployment {
+
+/** The <type>XPackageManager</type> interface is used to add or remove
+ packages to a specific deployment context.
+ Packages are deployable files, e.g. scripts or UNO components.
+ <p>
+ 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.
+ </p>
+ <p>
+ Removing an UNO package means that the previously added package is revoked,
+ thus deactivated, first and then removed from the context.
+ </p>
+ <p>
+ Objects of this interface are created using the
+ <type>XPackageManagerFactory</type> service resp. the singleton
+ <code>
+ /singletons/com.sun.star.deployment.thePackageManagerFactory
+ </code>.
+ </p>
+
+ @see thePackageManagerFactory
+ @since OOo 2.0.0
+*/
+interface XExtensionManager
+{
+ /** interface to notify disposing
+ */
+// interface com::sun::star::lang::XComponent;
+
+// /** interface to notify changes of the set of deployed packages of
+// this manager
+// */
+// interface com::sun::star::util::XModifyBroadcaster;
+
+
+ /** gets the supported <type>XPackageTypeInfo</type>s.
+
+ @return
+ supported <type>XPackageTypeInfo</type>s.
+ */
+ sequence<XPackageTypeInfo> getSupportedPackageTypes(
+ [in] string repository);
+
+ /** creates a command channel to be used to asynchronously abort a command.
+
+ @return
+ abort channel
+ */
+ com::sun::star::task::XAbortChannel createAbortChannel();
+
+ /** adds an UNO package.
+
+ @param url
+ package URL, must be UCB conform
+ @param repository
+ the name of the repository
+ @param xAbortChannel
+ abort channel to asynchronously abort the adding process,
+ or null
+ @param xCmdEnv
+ command environment for error and progress handling
+ @return
+ object representing the extension.
+ */
+ XPackage addExtension( [in] string url,
+ [in] string repository,
+ [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);
+
+ /** removes an UNO package.
+
+ @param identifier
+ package identifier
+ @param fileName
+ package file name
+ @param repository
+ the name of the repository
+ @param xAbortChannel
+ abort channel to asynchronously abort the removing process,
+ or null
+ @param xCmdEnv
+ command environment for error and progress handling
+ */
+ void removeExtension(
+ [in] string identifier,
+ [in] string fileName,
+ [in] string repository,
+ [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);
+
+
+ /** enable an extension.
+
+ If the extension is not from the user repository then an
+ IllegalArgumentException is thrown.
+
+ @param extension
+ the extension which is to be enabled.
+ @param xAbortChannel
+ abort channel to asynchronously abort the removing process,
+ or null
+ @param xCmdEnv
+ command environment for error and progress handling
+ */
+ void enableExtension(
+ [in] XPackage extension,
+ [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);
+
+ /** disable an extension.
+
+ If the extension is not from the user repository then an
+ IllegalArgumentException is thrown.
+
+ @param extension
+ the extension which is to be disabled
+ @param xAbortChannel
+ abort channel to asynchronously abort the removing process,
+ or null
+ @param xCmdEnv
+ command environment for error and progress handling
+ */
+ void disableExtension(
+ [in] XPackage extension,
+ [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 all currently deployed extensions.
+ @param repository
+ the repository from which the extensions are returned
+ @param xAbortChannel
+ abort channel to asynchronously abort the removing process,
+ or null
+ @param xCmdEnv
+ command environment for error and progress handling
+ @return
+ all currently deployed packages
+ */
+ sequence<XPackage> getDeployedExtensions(
+ [in] string repository,
+ [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 a deployed extensions.
+
+ @param repositroy
+ the name of the repository
+ @param identifier
+ package identifier
+ @param fileName
+ package file name
+ @param xCmdEnv
+ command environment for error and progress handling
+ @return
+ <type>XPackage</type> handle
+ */
+ XPackage getDeployedExtension(
+ [in] string repository,
+ [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);
+
+ /** returns a sequence containing all installed extensions.
+
+ The members of the returned sequence correspond to an extension with a
+ particular extension identifer. The members are also sequences which
+ contain as many elements as there are repositories. Those are ordered
+ according to the priority of the repository. That is, the first member
+ is the extension from the user repository, the second is from the shared
+ repository and the last is from the bundled repository.
+ */
+ sequence<sequence<XPackage> > getAllExtensions(
+ [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);
+
+
+ /** Expert feature: erases the underlying registry cache and reinstalls
+ all previously added packages. Please keep in mind that all
+ registration status get lost.
+ <p>
+ Please use this in case of suspected cache inconsistencies only.
+ </p>
+ @param repositroy
+ the name of the repository
+ @param xAbortChannel
+ abort channel to asynchronously abort the adding process
+ @param xCmdEnv
+ command environment for error and progress handling
+ */
+ void reinstallDeployedExtensions(
+ [in] string repository,
+ [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);
+
+
+ /** synchronizes the extension database with the contents of the extensions
+ folder.
+
+ Added extensions will be added to the database and removed extensions
+ will be removed from the database.
+
+ @param repository
+ the repository which is to be synchronized
+ */
+ void synchronize(
+ [in] string repository,
+ [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);
+
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/deployment/XPackage.idl b/offapi/com/sun/star/deployment/XPackage.idl
index f54ec347e368..89bd48b7a9ce 100644
--- a/offapi/com/sun/star/deployment/XPackage.idl
+++ b/offapi/com/sun/star/deployment/XPackage.idl
@@ -306,6 +306,10 @@ interface XPackage
should be used.
*/
com::sun::star::graphic::XGraphic getIcon( [in] boolean highContrast );
+
+ /** returns the name of the repository where this object comes from.
+ */
+ string getRepositoryName();
};
}; }; }; };
diff --git a/offapi/com/sun/star/deployment/XPackageManager.idl b/offapi/com/sun/star/deployment/XPackageManager.idl
index 544cd7758eb0..87a2e76bbf72 100644
--- a/offapi/com/sun/star/deployment/XPackageManager.idl
+++ b/offapi/com/sun/star/deployment/XPackageManager.idl
@@ -42,16 +42,20 @@
module com { module sun { module star { module deployment {
/** The <type>XPackageManager</type> interface is used to add or remove
- packages to a specific deployment context.
+ packages to a specific repository. This interface represents a particular
+ repository.
Packages are deployable files, e.g. scripts or UNO components.
<p>
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.
+ in the repository.
</p>
<p>
- Removing an UNO package means that the previously added package is revoked,
- thus deactivated, first and then removed from the context.
+ Removing an UNO package means that the previously added package is
+ removed from the repository.
+ </p>
+ <p>
+ All interface methods do neither register or revoke an extension.
+ This happens exclusively by <type>XExtensionManager</type>.
</p>
<p>
Objects of this interface are created using the
@@ -119,6 +123,30 @@ interface XPackageManager
com::sun::star::ucb::CommandAbortedException,
com::sun::star::lang::IllegalArgumentException);
+ /** adds an extension.
+
+ This copies the extension. If it was from the same repository,
+ which is represented by this XPackageManager insterface, then
+ nothing happens.
+
+ @param extension
+
+ @param xAbortChannel
+ abort channel to asynchronously abort the adding process,
+ or null
+ @param xCmdEnv
+ command environment for error and progress handling
+ @return
+ <type>XPackage</type> handle
+ */
+ XPackage importExtension( [in] XPackage extension,
+ [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);
+
/** removes an UNO package.
@param identifier
@@ -212,6 +240,26 @@ interface XPackageManager
*/
boolean isReadOnly();
+ /** synchronizes the extension database with the contents of the extensions
+ folder.
+
+ Added extensions will be added to the database and removed extensions
+ will be removed from the database.
+
+ @param xAddedExtension
+ new extensions which may need to be registered.
+
+ @param
+ removed extensions which must be revoked
+ */
+ void synchronize([out] sequence<XPackage> xAddedExtensions,
+ [out] sequence<XPackage> xRemovedExtensions,
+ [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);
+
};
}; }; }; };
diff --git a/offapi/com/sun/star/deployment/XPackageRegistry.idl b/offapi/com/sun/star/deployment/XPackageRegistry.idl
index 3cfa6a75236c..7f0b8c5c42d4 100644
--- a/offapi/com/sun/star/deployment/XPackageRegistry.idl
+++ b/offapi/com/sun/star/deployment/XPackageRegistry.idl
@@ -50,6 +50,15 @@ interface XPackageRegistry
package URL, must be UCB conform
@param mediaType
media type of package, empty string if to be detected
+ @param noFileAccess
+ true - the implementation may not try to access the files referenced
+ by the parameter url. This is useful when the files are already
+ removed, but the respective XPackage object haven not been
+ revoked yet. Then the caller can obtain an XPackage object for the
+ removed extension and call XPackage.revokePackage.
+ The implementation can throw an
+ <type>com.sun.star.lang.IllegalArgumentException</type> if it does
+ not support this.
@param xCmdEnv
command environment for error and progress handling
@return
@@ -58,6 +67,7 @@ interface XPackageRegistry
XPackage bindPackage(
[in] string url,
[in] string mediaType,
+ [in] boolean noFileAccess,
[in] com::sun::star::ucb::XCommandEnvironment xCmdEnv )
raises (DeploymentException,
com::sun::star::ucb::CommandFailedException,
diff --git a/offapi/com/sun/star/deployment/makefile.mk b/offapi/com/sun/star/deployment/makefile.mk
index fef835e62f31..40e87297710e 100644
--- a/offapi/com/sun/star/deployment/makefile.mk
+++ b/offapi/com/sun/star/deployment/makefile.mk
@@ -42,6 +42,8 @@ IDLFILES = \
PackageRegistryBackend.idl \
XPackageManager.idl \
XPackageManagerFactory.idl \
+ XExtensionManager.idl \
+ ExtensionManager.idl \
thePackageManagerFactory.idl \
DependencyException.idl \
LicenseException.idl \