super(ureq, wControl);
folderContainer = this.createVelocityContainer("run");
editQuotaButton = LinkFactory.createButtonSmall("editQuota", folderContainer, this);
BusinessControl bc = getWindowControl().getBusinessControl();
// --- subscription ---
VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(rootContainer);
if (secCallback != null) {
subsContext = secCallback.getSubscriptionContext();
// if null, then no subscription is desired
if (subsContext != null && (rootContainer instanceof OlatRelPathImpl)) {
String businessPath = wControl.getBusinessControl().getAsString();
String data = ((OlatRelPathImpl)rootContainer).getRelPath();
PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(FolderModule.class), data, businessPath);
csController = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, pdata);
folderContainer.put("subscription", csController.getInitialComponent());
}
}
SearchServiceUIFactory searchUIFactory = (SearchServiceUIFactory)ServiceFactory.getService(SearchServiceUIFactory.class);
if(displaySearch) {
searchC = searchUIFactory.createInputController(ureq, wControl, DisplayOption.STANDARD, null);
folderContainer.put("searchcomp", searchC.getInitialComponent());
}
folderComponent = new FolderComponent(ureq, "foldercomp", rootContainer, ureq.getLocale(), filter);
folderComponent.addListener(this);
folderContainer.put("foldercomp", folderComponent);
if (WebDAVManager.getInstance().isEnabled() && displayWebDAVLink)
folderContainer.contextPut("webdavlink", FolderManager.getWebDAVLink());
selTree = new SelectionTree("seltree", getTranslator());
selTree.addListener(this);
folderContainer.put("seltree", selTree);
// jump to either the forum or the folder if the business-launch-path says so.
ContextEntry ce = bc.popLauncherContextEntry();
if ( ce != null ) { // a context path is left for me
if (log.isDebug()) log.debug("businesscontrol (for further jumps) would be:"+bc);
OLATResourceable ores = ce.getOLATResourceable();
if (log.isDebug()) log.debug("OLATResourceable=" + ores);
String typeName = ores.getResourceableTypeName();