revokePackage (Java) - removing an extension
Posted: Tue May 19, 2009 1:39 pm
Hello
How come that the function "removeAllUserExtentions" does not remove any of my extentions I installed?
regards
Rune
public static void removeAllUserExtensions() throws BootstrapException, com.sun.star.uno.Exception, com.sun.star.lang.IllegalArgumentException
{
System.out.println("removeAllUserExtensions");
XComponentContext xContext = null;
xContext = Bootstrap.bootstrap();
XPackageManagerFactory packageManagerFactory = thePackageManagerFactory.get(xContext);
XPackageManager packageManager = packageManagerFactory.getPackageManager("user");
XPackage[] packages = packageManager.getDeployedPackages(null, null);
for (int i=0; i< packages.length; ++i)
{
XPackage xpackage = packages;
XAbortChannel abortchannel = xpackage.createAbortChannel();
XCommandEnvironment commandenviroment = null;
System.out.println("Removing:"+xpackage.getName()+", "+xpackage.getVersion());
xpackage.revokePackage(abortchannel, commandenviroment);
}
}
displays:
removeAllUserExtensions
Removing:test.oxt, 20090518.0.3
How come that the function "removeAllUserExtentions" does not remove any of my extentions I installed?
regards
Rune
public static void removeAllUserExtensions() throws BootstrapException, com.sun.star.uno.Exception, com.sun.star.lang.IllegalArgumentException
{
System.out.println("removeAllUserExtensions");
XComponentContext xContext = null;
xContext = Bootstrap.bootstrap();
XPackageManagerFactory packageManagerFactory = thePackageManagerFactory.get(xContext);
XPackageManager packageManager = packageManagerFactory.getPackageManager("user");
XPackage[] packages = packageManager.getDeployedPackages(null, null);
for (int i=0; i< packages.length; ++i)
{
XPackage xpackage = packages;
XAbortChannel abortchannel = xpackage.createAbortChannel();
XCommandEnvironment commandenviroment = null;
System.out.println("Removing:"+xpackage.getName()+", "+xpackage.getVersion());
xpackage.revokePackage(abortchannel, commandenviroment);
}
}
displays:
removeAllUserExtensions
Removing:test.oxt, 20090518.0.3