use of org.xwiki.extension.repository.internal.installed.DefaultInstalledExtension in project xwiki-platform by xwiki.
the class JARTranslationBundleFactoryTest method mockInstalledExtension.
private DefaultInstalledExtension mockInstalledExtension(ExtensionId extensionId, String namespace) {
DefaultLocalExtension localExtension = new DefaultLocalExtension(null, extensionId, "jar");
localExtension.setFile(this.extensionPackager.getExtensionFile(extensionId));
DefaultInstalledExtension installedExtension = new DefaultInstalledExtension(localExtension, null);
installedExtension.setInstalled(true, namespace);
return installedExtension;
}
use of org.xwiki.extension.repository.internal.installed.DefaultInstalledExtension in project xwiki-platform by xwiki.
the class JARTranslationBundleFactoryTest method mockUninstallExtension.
private void mockUninstallExtension(ExtensionId extensionId, String namespace) throws ComponentLookupException {
DefaultInstalledExtension installedExtension = mockInstalledExtension(extensionId, namespace);
getObservationManager().notify(new ExtensionUninstalledEvent(extensionId, namespace), installedExtension);
}
use of org.xwiki.extension.repository.internal.installed.DefaultInstalledExtension in project xwiki-platform by xwiki.
the class JARTranslationBundleFactoryTest method mockUpgradeExtension.
private void mockUpgradeExtension(ExtensionId previousExtensionId, ExtensionId newExtensionId, String namespace) throws ComponentLookupException {
DefaultInstalledExtension previousInstalledExtension = mockInstalledExtension(previousExtensionId, namespace);
DefaultInstalledExtension newInstalledExtension = mockInstalledExtension(newExtensionId, namespace);
getObservationManager().notify(new ExtensionUpgradedEvent(newExtensionId, namespace), newInstalledExtension, Arrays.asList(previousInstalledExtension));
}
use of org.xwiki.extension.repository.internal.installed.DefaultInstalledExtension in project xwiki-platform by xwiki.
the class JARTranslationBundleFactoryTest method mockInstallExtension.
private void mockInstallExtension(ExtensionId extensionId, String namespace) throws ComponentLookupException {
DefaultInstalledExtension installedExtension = mockInstalledExtension(extensionId, namespace);
getObservationManager().notify(new ExtensionInstalledEvent(extensionId, namespace), installedExtension);
}
Aggregations