use of org.olat.modules.taxonomy.ui.component.TaxonomyVFSSecurityCallback in project OpenOLAT by OpenOLAT.
the class DocumentPoolMainController method doSelectTaxonomyLevel.
private DocumentPoolLevelController doSelectTaxonomyLevel(UserRequest ureq, TaxonomyTreeNode node) {
if (isTaxonomyAdmin || node.isCanRead() || node.isCanWrite()) {
TaxonomyLevel level = node.getTaxonomyLevel();
SubscriptionContext subscriptionCtx = notificationsHandler.getTaxonomyDocumentsLibrarySubscriptionContext();
TaxonomyVFSSecurityCallback secCallback = new TaxonomyVFSSecurityCallback(node, subscriptionCtx);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("TaxonomyLevel", node.getTaxonomyLevel().getKey());
WindowControl bwControl = addToHistory(ureq, ores, null);
DocumentPoolLevelController levelCtrl = new DocumentPoolLevelController(ureq, bwControl, level, node, secCallback);
listenTo(levelCtrl);
String displayName = level.getDisplayName();
content.popUpToRootController(ureq);
List<TreeNode> parentLines = TreeHelper.getTreePath(node);
for (int i = 1; i < parentLines.size() - 1; i++) {
TreeNode parent = parentLines.get(i);
content.pushController(parent.getTitle(), null, parent);
}
content.pushController(displayName, levelCtrl);
return levelCtrl;
}
return null;
}
use of org.olat.modules.taxonomy.ui.component.TaxonomyVFSSecurityCallback in project OpenOLAT by OpenOLAT.
the class DocumentPoolWebDAVMergeSource method addTemplates.
private VFSContainer addTemplates(TaxonomyTreeNode taxonomyNode, Taxonomy taxonomy) {
VFSContainer documents = taxonomyService.getDocumentsLibrary(taxonomy);
SubscriptionContext subscriptionCtx = notificationsHandler.getTaxonomyDocumentsLibrarySubscriptionContext();
TaxonomyVFSSecurityCallback secCallback = new TaxonomyVFSSecurityCallback(taxonomyNode, subscriptionCtx);
System.out.println(taxonomyNode.isCanWrite());
documents.setLocalSecurityCallback(secCallback);
return new NamedContainerImpl(taxonomyNode.getTitle(), documents);
}
use of org.olat.modules.taxonomy.ui.component.TaxonomyVFSSecurityCallback in project OpenOLAT by OpenOLAT.
the class DocumentPoolWebDAVMergeSource method addDocument.
private VFSContainer addDocument(TaxonomyTreeNode taxonomyNode) {
VFSContainer documents = taxonomyService.getDocumentsLibrary(taxonomyNode.getTaxonomyLevel());
SubscriptionContext subscriptionCtx = notificationsHandler.getTaxonomyDocumentsLibrarySubscriptionContext();
TaxonomyVFSSecurityCallback secCallback = new TaxonomyVFSSecurityCallback(taxonomyNode, subscriptionCtx);
documents.setLocalSecurityCallback(secCallback);
return new NamedContainerImpl("_documents", documents);
}
use of org.olat.modules.taxonomy.ui.component.TaxonomyVFSSecurityCallback in project openolat by klemens.
the class DocumentPoolMainController method doSelectTaxonomyLevel.
private DocumentPoolLevelController doSelectTaxonomyLevel(UserRequest ureq, TaxonomyTreeNode node) {
if (isTaxonomyAdmin || node.isCanRead() || node.isCanWrite()) {
TaxonomyLevel level = node.getTaxonomyLevel();
SubscriptionContext subscriptionCtx = notificationsHandler.getTaxonomyDocumentsLibrarySubscriptionContext();
TaxonomyVFSSecurityCallback secCallback = new TaxonomyVFSSecurityCallback(node, subscriptionCtx);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("TaxonomyLevel", node.getTaxonomyLevel().getKey());
WindowControl bwControl = addToHistory(ureq, ores, null);
DocumentPoolLevelController levelCtrl = new DocumentPoolLevelController(ureq, bwControl, level, node, secCallback);
listenTo(levelCtrl);
String displayName = level.getDisplayName();
content.popUpToRootController(ureq);
List<TreeNode> parentLines = TreeHelper.getTreePath(node);
for (int i = 1; i < parentLines.size() - 1; i++) {
TreeNode parent = parentLines.get(i);
content.pushController(parent.getTitle(), null, parent);
}
content.pushController(displayName, levelCtrl);
return levelCtrl;
}
return null;
}
use of org.olat.modules.taxonomy.ui.component.TaxonomyVFSSecurityCallback in project openolat by klemens.
the class DocumentPoolWebDAVMergeSource method addTemplates.
private VFSContainer addTemplates(TaxonomyTreeNode taxonomyNode, Taxonomy taxonomy) {
VFSContainer documents = taxonomyService.getDocumentsLibrary(taxonomy);
SubscriptionContext subscriptionCtx = notificationsHandler.getTaxonomyDocumentsLibrarySubscriptionContext();
TaxonomyVFSSecurityCallback secCallback = new TaxonomyVFSSecurityCallback(taxonomyNode, subscriptionCtx);
System.out.println(taxonomyNode.isCanWrite());
documents.setLocalSecurityCallback(secCallback);
return new NamedContainerImpl(taxonomyNode.getTitle(), documents);
}
Aggregations