use of org.xwiki.extension.xar.internal.repository.XarInstalledExtensionRepository in project xwiki-platform by xwiki.
the class DocumentsDeletingListener method checkIfPageBelongToExtensions.
private void checkIfPageBelongToExtensions(EntitySelection entitySelection, ExtensionBreakingQuestion question) {
XarInstalledExtensionRepository repository = (XarInstalledExtensionRepository) installedExtensionRepository;
DocumentReference documentReference = (DocumentReference) entitySelection.getEntityReference();
Collection<XarInstalledExtension> extensions = repository.getXarInstalledExtensions(documentReference);
if (extensions.isEmpty()) {
question.markAsFreePage(entitySelection);
return;
}
for (XarInstalledExtension extension : extensions) {
question.pageBelongsToExtension(entitySelection, extension);
}
}
Aggregations