Search in sources :

Example 1 with ExtensionUpgradedEvent

use of org.xwiki.extension.event.ExtensionUpgradedEvent 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));
}
Also used : ExtensionUpgradedEvent(org.xwiki.extension.event.ExtensionUpgradedEvent) DefaultInstalledExtension(org.xwiki.extension.repository.internal.installed.DefaultInstalledExtension)

Aggregations

ExtensionUpgradedEvent (org.xwiki.extension.event.ExtensionUpgradedEvent)1 DefaultInstalledExtension (org.xwiki.extension.repository.internal.installed.DefaultInstalledExtension)1