use of org.olat.core.util.vfs.filters.VFSLeafButSystemFilter in project OpenOLAT by OpenOLAT.
the class OLATUpgrade_12_3_0 method moveDocumentPoolInfosPage.
private boolean moveDocumentPoolInfosPage(UpgradeManager upgradeManager, UpgradeHistoryData uhd) {
boolean allOk = true;
if (!uhd.getBooleanDataValue(MOVE_DOC_POOL_INFOS_PAGE)) {
String path = "/" + TaxonomyService.DIRECTORY + "/" + DocumentPoolModule.INFOS_PAGE_DIRECTORY;
VFSContainer taxonomyContainer = new OlatRootFolderImpl(path, null);
VFSContainer documentPoolContainer = documentPoolModule.getInfoPageContainer();
if (taxonomyContainer.exists() && documentPoolContainer.getItems(new VFSLeafButSystemFilter()).isEmpty() && !taxonomyContainer.getItems(new VFSLeafButSystemFilter()).isEmpty()) {
VFSManager.copyContent(taxonomyContainer, documentPoolContainer);
taxonomyContainer.delete();
}
uhd.setBooleanDataValue(MOVE_DOC_POOL_INFOS_PAGE, allOk);
upgradeManager.setUpgradesHistory(uhd, VERSION);
}
return allOk;
}
use of org.olat.core.util.vfs.filters.VFSLeafButSystemFilter in project openolat by klemens.
the class OLATUpgrade_12_3_0 method moveDocumentPoolInfosPage.
private boolean moveDocumentPoolInfosPage(UpgradeManager upgradeManager, UpgradeHistoryData uhd) {
boolean allOk = true;
if (!uhd.getBooleanDataValue(MOVE_DOC_POOL_INFOS_PAGE)) {
String path = "/" + TaxonomyService.DIRECTORY + "/" + DocumentPoolModule.INFOS_PAGE_DIRECTORY;
VFSContainer taxonomyContainer = new OlatRootFolderImpl(path, null);
VFSContainer documentPoolContainer = documentPoolModule.getInfoPageContainer();
if (taxonomyContainer.exists() && documentPoolContainer.getItems(new VFSLeafButSystemFilter()).isEmpty() && !taxonomyContainer.getItems(new VFSLeafButSystemFilter()).isEmpty()) {
VFSManager.copyContent(taxonomyContainer, documentPoolContainer);
taxonomyContainer.delete();
}
uhd.setBooleanDataValue(MOVE_DOC_POOL_INFOS_PAGE, allOk);
upgradeManager.setUpgradesHistory(uhd, VERSION);
}
return allOk;
}
Aggregations