Package org.olat.core.id.context

Examples of org.olat.core.id.context.BusinessControl


   
    // check if there is a bookmark part in the url
    String bookmark = ureq.getParameter("o_bkm"); // e.g. [demo*5]
    if (bookmark != null) {
      // attach the launcher data
      BusinessControl bc = BusinessControlFactory.getInstance().createFromString(bookmark);
      // generate new window control with the business control attached to it
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, bwControl);
    }   
   
    Controller c = contentControllerCreator.createController(ureq, bwControl);
View Full Code Here


   
    // strip beginning slash
    String startURI = ( (fileName.charAt(0) == '/')? fileName.substring(1) : fileName);

    // jump (e.g. from search) to the path if the business-launch-path says so.
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if ( ce != null ) { // a context path is left for me
      Tracing.logDebug("businesscontrol (for further jumps) would be:"+bc, SinglePageController.class);
      OLATResourceable ores = ce.getOLATResourceable();
      Tracing.logDebug("OLATResourceable=" + ores, SinglePageController.class);
      String typeName = ores.getResourceableTypeName();
View Full Code Here

    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();
View Full Code Here

              String cName = wci.getControllerClassName();
              coInfo = cName + ":" + coInfo; 
              wci = wci.getParentWindowControlInfo();
            }
           
            BusinessControl bc = wCo.getBusinessControl();
            String businessPath = bc == null? "n/a":bc.getAsString();
            String compName = target.getComponentName();
            String msg = "wci:"+coInfo+"%%"+compName+"%%"+businessPath+"%%";
            // allowed for debugging, dispatching is already over
            Event ev = target.getAndClearLatestFiredEvent();
            if (ev != null) {
View Full Code Here

  }
 
  @Override
  public SearchController createInputController(UserRequest ureq, WindowControl wControl, DisplayOption displayOption, Form mainForm) {
    String resourceUrl = null;
    BusinessControl bc = wControl.getBusinessControl();
    if (bc != null) {
      resourceUrl = bc.getAsString();
    }
   
    SearchInputController searchCtrl;
    if (mainForm == null) {
      searchCtrl = new SearchInputController(ureq, wControl, resourceUrl, displayOption);
View Full Code Here

  }

  @Override
  public SearchController createSearchController(UserRequest ureq, WindowControl wControl) {
    String resourceUrl = null;
    BusinessControl bc = wControl.getBusinessControl();
    if (bc != null) {
      resourceUrl = bc.getAsString();
    }
    return new ResultsSearchController(ureq, wControl, resourceUrl);
  }
View Full Code Here

    // Add message id to business path if nodemcd is available
    if (nodecmd != null) {
      try {
        Long messageId = Long.valueOf(nodecmd);
        BusinessControlFactory bcf =  BusinessControlFactory.getInstance();
        BusinessControl businessControl = bcf.createFromString("[Message:"+messageId+"]");
        wControl = bcf.createBusinessWindowControl(businessControl, wControl);
      } catch (NumberFormatException e) {
        // ups, nodecmd is not a message, what the heck is it then?
        Tracing.createLoggerFor(this.getClass()).warn("Could not create message ID from given nodemcd::" + nodecmd, e);
      }
View Full Code Here

              //try with the new factory controller too
                boolean newFactory = false;
                if(launchController == null) {
                  try  {
                    String resourceUrl = "[" + resName + ":0][notifications]";
                    BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
                    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
                    NewControllerFactory.getInstance().launch(ureq, bwControl);
                    newFactory = true;
                  } catch (Exception ex) {
                    //fail silently
View Full Code Here

    // jump to either the forum or the folder if the business-launch-path says
    // so.
    boolean showAssessmentTool = false;
   
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if (ce != null) {
      logDebug("businesscontrol (for further jumps) would be:" + bc, null);
      OLATResourceable ores = ce.getOLATResourceable();
      logDebug("OLATResourceable=" + ores, null);
      if (OresHelper.isOfType(ores, CourseNode.class)) {
        // TODO, don't use CourseNode.class, but a lookup using the ClassToId
        // class
        // jump to the coursenode with id
        Long nodeId = ores.getResourceableId();
        String nodeIdS = nodeId.toString();
        currentCourseNode = course.getRunStructure().getNode(nodeIdS);
        if (currentCourseNode == null) {
          // (e.g. a coursenode that no longer is accessible or existing)
          // -> fallback to root node (automatically done later), and drop wrong
          // remaining contexts
          logDebug("currentCourseNode=null => dropLauncherEntries for nodeIdS=" + nodeIdS, null);
          bc.dropLauncherEntries();
        }
      } else if ("assessmentTool".equals(ores.getResourceableTypeName())) {
        showAssessmentTool = true;
      }
    }
View Full Code Here

        DispatcherAction.redirectTo(response, url);
        return;
      }
      String businessPath = (String) usess.removeEntryFromNonClearedStore(AUTHDISPATCHER_BUSINESSPATH);
      if (businessPath != null) {
        BusinessControl bc = BusinessControlFactory.getInstance().createFromString(businessPath);
        ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute("AUTHCHIEFCONTROLLER");

        WindowControl wControl = cc.getWindowControl();
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, wControl);
        NewControllerFactory.getInstance().launch(ureq, bwControl)
        // render the window
        Window w = cc.getWindow();
        w.dispatchRequest(ureq, true); // renderOnly
        return;
      }
     
      // 1. check for direct launch urls, see org.olat.core.dispatcher.jumpin.JumpinConfig
      if (!ureq.isValidDispatchURI()) {
        JumpInReceptionist jh = JumpInManager.getInstance().getJumpInReceptionist(ureq);
        if (jh == null) {
          // found no JumpInManager => try with new 5.1 JumpIn-Resource URL
          String uri = ureq.getNonParsedUri();
          if (uri.startsWith(JumpInManager.CONST_EXTLINK)) {
            String resourceUrl = ureq.getParameter(JumpInManager.CONST_RESOURCE_URL);
            if (resourceUrl != null) {
              // attach the launcher data
              BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
              try {
                // get main window and dynamic tabs
                // brasato:: ChiefController cc = Windows.getWindows(usess).getWindowManager().getMainChiefController();
                ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute(AUTHCHIEFCONTROLLER);
View Full Code Here

TOP

Related Classes of org.olat.core.id.context.BusinessControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.