use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.
the class BinderController method activateEntries.
private void activateEntries(UserRequest ureq) {
int numOfPages = doOpenEntries(ureq).getNumOfPages();
if (numOfPages == 1 && !secCallback.canEditBinder()) {
PortfolioElementRow firstPage = entriesCtrl.getFirstPage();
if (firstPage != null) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Page", firstPage.getPage().getKey());
List<ContextEntry> entries = BusinessControlFactory.getInstance().createCEListFromString(ores);
entriesCtrl.activate(ureq, entries, null);
}
}
}
use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.
the class BinderController method doOpenOverview.
private TableOfContentController doOpenOverview(UserRequest ureq) {
popUpToBinderController(ureq);
if (overviewCtrl == null) {
OLATResourceable bindersOres = OresHelper.createOLATResourceableInstance("Toc", 0l);
WindowControl swControl = addToHistory(ureq, bindersOres, null);
overviewCtrl = new TableOfContentController(ureq, swControl, stackPanel, secCallback, binder, config);
// because it will not end in the stackPanel as a pushed controller
overviewCtrl.initTools();
listenTo(overviewCtrl);
} else {
overviewCtrl.loadModel();
overviewCtrl.updateSummaryView(ureq);
}
segmentButtonsCmp.setSelectedButton(overviewLink);
mainPanel.setContent(overviewCtrl.getInitialComponent());
return overviewCtrl;
}
use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.
the class BinderListController method doOpenBinder.
protected BinderController doOpenBinder(UserRequest ureq, Binder binder) {
if (binder == null) {
showWarning("warning.portfolio.not.found");
return null;
} else {
removeAsListenerAndDispose(binderCtrl);
portfolioService.updateBinderUserInformations(binder, getIdentity());
OLATResourceable binderOres = OresHelper.createOLATResourceableInstance("Binder", binder.getKey());
WindowControl swControl = addToHistory(ureq, binderOres, null);
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForOwnedBinder(binder);
BinderConfiguration config = BinderConfiguration.createConfig(binder);
binderCtrl = new BinderController(ureq, swControl, stackPanel, secCallback, binder, config);
listenTo(binderCtrl);
stackPanel.pushController(binder.getTitle(), binderCtrl);
return binderCtrl;
}
}
use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.
the class PortfolioServiceImpl method updateCategories.
@Override
public void updateCategories(Media media, List<String> categories) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance(Media.class, media.getKey());
updateCategories(ores, categories);
}
use of org.olat.core.id.OLATResourceable in project OpenOLAT by OpenOLAT.
the class PortfolioServiceImpl method updateCategories.
@Override
public void updateCategories(PortfolioElement element, List<String> categories) {
OLATResourceable ores = getOLATResoucreable(element);
updateCategories(ores, categories);
}
Aggregations