Search in sources :

Example 1 with ExtensionPlanAction

use of org.xwiki.extension.job.plan.ExtensionPlanAction in project xwiki-platform by xwiki.

the class OutdatedExtensionsDistributionStep method repair.

private void repair(ExtensionId invalidExtension, String namespace) throws JobException, InterruptedException {
    // Find valid extension version
    ExtensionPlan plan = createRepairPlan(invalidExtension, namespace);
    // Install valid extension version
    if (plan.getTree().size() > 0) {
        ExtensionPlanAction action = plan.getTree().iterator().next().getAction();
        install(action.getExtension().getId(), namespace, false);
    }
}
Also used : ExtensionPlan(org.xwiki.extension.job.plan.ExtensionPlan) ExtensionPlanAction(org.xwiki.extension.job.plan.ExtensionPlanAction)

Aggregations

ExtensionPlan (org.xwiki.extension.job.plan.ExtensionPlan)1 ExtensionPlanAction (org.xwiki.extension.job.plan.ExtensionPlanAction)1