Package org.olat.core.id.context

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


      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFORUM, OlatResourceableType.forum));
      SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFORUM);
     
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the forum clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFORUM);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);

      collabToolCtr = collabTools.createForumController(ureq, bwControl, isAdmin, ureq.getUserSession().getRoles().isGuestOnly(),  sc);
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_CHAT.equals(cmd)) {
      collabToolCtr = collabTools.createChatController(ureq, getWindowControl(), this.businessGroup.getName());
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_CALENDAR.equals(cmd)) {
      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLCAL, OlatResourceableType.calendar));
     
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the forum clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLCAL);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);

      collabToolCtr = collabTools.createCalendarController(ureq, bwControl, this.businessGroup, isAdmin);
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_INFORMATION.equals(cmd)) {
      collabToolCtr = collabTools.createNewsController(ureq, getWindowControl());
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_FOLDER.equals(cmd)) {
      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFOLDER, OlatResourceableType.sharedFolder));

      SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFOLDER);
     
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the forum clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFOLDER);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);

      collabToolCtr = collabTools.createFolderController(ureq, bwControl, sc);
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_MEMBERSLIST.equals(cmd)) {
      doShowMembers(ureq);
    } else if (ACTIVITY_MENUSELECT_CONTACTFORM.equals(cmd)) {
      doContactForm(ureq);
    } else if (ACTIVITY_MENUSELECT_ADMINISTRATION.equals(cmd)) {
      doAdministration(ureq);
    } else if (ACTIVITY_MENUSELECT_SHOW_RESOURCES.equals(cmd)) {
      doShowResources(ureq);
    } else if (ACTIVITY_MENUSELECT_WIKI.equals(cmd)) {
      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLWIKI, OlatResourceableType.wiki));
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the wiki clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLWIKI);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);
      ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapWikiOres(ce.getOLATResourceable()));

      collabToolCtr = collabTools.createWikiController(ureq, bwControl);
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    }
View Full Code Here


    Identity focusOnIdentity = null;
    ICourse course = CourseFactory.loadCourse(ores);
    boolean hasAssessableNodes = course.hasAssessableNodes();
    if (hasAssessableNodes) {
      BusinessControl bc = getWindowControl().getBusinessControl();
      ContextEntry ceIdentity = bc.popLauncherContextEntry();
      if (ceIdentity != null) {
        OLATResourceable oresIdentity = ceIdentity.getOLATResourceable();
        if (OresHelper.isOfType(oresIdentity, Identity.class)) {
          Long identityKey = oresIdentity.getResourceableId();
          focusOnIdentity = ManagerFactory.getManager().loadIdentityByKey(identityKey);
        }
      }
View Full Code Here

      dt = dts.createDTab(ores, displayName);
      if (dt == null) return;
     
      // build up the context path
      OLATResourceable businessOres = repositoryEntry;
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
      WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, dt.getWindowControl());
     
      Controller ctrl = typeToLaunch.getLaunchController(ores, null, ureq, bwControl);
      // if resource is an image, PDF or eq. (e.g. served by resulting media request), no controller is returned.
      // FIXME:fj:test this
View Full Code Here

    this.ores = ores;
    doIdentityAssessmentOverview(ureq, true);   
    putInitialPanel(main);
   
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if (ce != null) {
      OLATResourceable oresNode = ce.getOLATResourceable();
      if (OresHelper.isOfType(oresNode, CourseNode.class)) {
        Long courseNodeId = oresNode.getResourceableId();
        Structure runStructure = assessedUserCourseEnvironment.getCourseEnvironment().getRunStructure();
        CourseNode courseNode = runStructure.getNode(courseNodeId.toString());
        if(courseNode instanceof AssessableCourseNode) {
View Full Code Here

      isResourceOwner = repoMgr.isOwnerOfRepositoryEntry(ureq.getIdentity(), repoMgr.lookupRepositoryEntry(res, true));
    }
   
   
    BusinessControl bc = wControl.getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    SubscriptionContext subsContext = new SubscriptionContext(res, WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    WikiSecurityCallback callback = new WikiSecurityCallbackImpl(null, isOLatAdmin, isGuestOnly, false, isResourceOwner, subsContext);
   
    if ( ce != null ) { //jump to a certain context
      OLATResourceable ores = ce.getOLATResourceable();
      String typeName = ores.getResourceableTypeName();
      String page = typeName.substring("page=".length());
      controller = WikiManager.getInstance().createWikiMainControllerDisposeOnOres(ureq, wControl, res, callback, page);
    } else {
      controller = WikiManager.getInstance().createWikiMainControllerDisposeOnOres(ureq, wControl, res, callback, null);
View Full Code Here

    //
    putInitialPanel(columnLayoutCtr.getInitialComponent());
   
    // Activate child controllers if a usable context entry is found
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if (ce != null) { // a context path is left for me
      OLATResourceable ores = ce.getOLATResourceable();
      if (OresHelper.equals(ores, BUSINESS_CONTROL_TYPE_FOLDER)) {
        // Activate folder controller
        menuTree.setSelectedNode(tm.findNodeByUserObject(CMD_FOLDER));
        main.setContent(createComponent(ureq, CMD_FOLDER, chosenIdentity));
      }
View Full Code Here

  public SubscriptionContext getNewUsersSubscriptionContext() {
    return new SubscriptionContext(RES_NAME, RES_ID, NEW);
  }
 
  public PublisherData getNewUsersPublisherData() {
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(new OLATResourceable() {
      @Override
      public Long getResourceableId() { return 0l; }
      @Override
      public String getResourceableTypeName() { return "NewIdentityCreated"; }
    });
    PublisherData publisherData = new PublisherData(RES_NAME, NEW, ce.toString());
    return publisherData;
  }
View Full Code Here

    LocalFolderImpl vfsWrapper = new LocalFolderImpl(cpRoot);
    Controller realController = null;
   
    // jump to either the forum or the folder if the business-launch-path says so.
    BusinessControl bc = wControl.getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if ( ce != null ) { // a context path is left for me
      Tracing.logDebug("businesscontrol (for further jumps) would be:"+bc, CPRunController.class);
      OLATResourceable ores = ce.getOLATResourceable();
      Tracing.logDebug("OLATResourceable=" + ores, CPRunController.class);
      String typeName = ores.getResourceableTypeName();
      // typeName format: 'path=/test1/test2/readme.txt'
      // First remove prefix 'path='
      String path = typeName.substring("path=".length());
View Full Code Here

      isResourceOwner = RepositoryManager.getInstance().isOwnerOfRepositoryEntry(ureq.getIdentity(), re);
    }
   
    // Check for jumping to certain wiki page
    BusinessControl bc = wControl.getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
   
    SubscriptionContext subsContext = WikiManager.createTechnicalSubscriptionContextForCourse(cenv, wikiCourseNode);
    WikiSecurityCallback callback = new WikiSecurityCallbackImpl(ne, isOLatAdmin, isGuestOnly, false, isResourceOwner, subsContext);
   
    if ( ce != null ) { //jump to a certain context
      OLATResourceable ores = ce.getOLATResourceable();
      String typeName = ores.getResourceableTypeName();
      String page = typeName.substring("page=".length());
      if(page.endsWith(":0")) {
        page = page.substring(0, page.length() - 2);
      }
View Full Code Here

        Class<CourseNode> oresC = CourseNode.class; // don't use the concrete instance since for the course: to jump to a coursenode with a given id is all there is to know
        Long oresK = new Long(Long.parseLong(courseNode.getIdent()));
        final OLATResourceable ores = OresHelper.createOLATResourceableInstance(oresC, oresK);
       
        //REVIEW:pb:this is responsible for building up the jumpable businesspath/REST URL kind of
        ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ores);
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl);
       
        if (previewMode) {
          ncr = new NodeRunConstructionResult(courseNode.createPreviewController(ureq, bwControl, userCourseEnv, nodeEval));
        } else {
View Full Code Here

TOP

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

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.