Examples of ContextEntry


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

  }

  private void adjustBusinessControlPath(UserRequest ureq, Message m) {
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(m));
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Message.class,m.getKey());
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ores);
   
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());   
   
    //Simple way to "register" the new ContextEntry although only a VelocityPage was flipped.
    Controller dummy = new BasicController(ureq, bwControl) {
View Full Code Here

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

  public String getSupportedTypeName() {
    return SUPPORTED_TYPE_NAME;
  }
 
  public boolean checkAccess(ContextEntry contextEntry, BusinessControl businessControl, Identity identity, Roles roles) {
    ContextEntry ce = businessControl.popLauncherContextEntry();
    Long resourceableId = ce.getOLATResourceable().getResourceableId();
    Message message = ForumManager.getInstance().loadMessage(resourceableId);
    Message threadtop = message.getThreadtop();
    if(threadtop==null) {
      threadtop = message;
    }
View Full Code Here

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

    RepositoryHandler handler = RepositoryHandlerFactory.getInstance().getRepositoryHandler(re);
 
   
    // build up the context path
    OLATResourceable businessOres = re;
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl)
 
    MainLayoutController ctrl = handler.getLaunchController(re.getOlatResource(), initialViewIdentifier, ureq, bwControl);
    if (ctrl == null) throw new AssertException("could not create controller for repositoryEntry "+re);
    if (ctrl instanceof MainLayoutController) {
View Full Code Here

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

      listenTo(contentCtr);
      return contentCtr.getInitialComponent();
    }
    else if (uobject.equals("created.newUsersNotification")) {
      activatePaneInDetailView = null;
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(new OLATResourceable() {
        @Override
        public Long getResourceableId() { return 0l; }
        @Override
        public String getResourceableTypeName() { return "NewIdentityCreated"; }
      });
View Full Code Here

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

      boolean isGMAdmin, String initialViewIdentifier) {

   
    // build up the context path
    OLATResourceable businessOres = businessGroup;
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl)
   
   
    String bgTyp = businessGroup.getType();
    if (BusinessGroup.TYPE_BUDDYGROUP.equals(bgTyp)) {
View Full Code Here

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

    }
    addLoggingResourceable(LoggingResourceable.wrap(cpNode));

    // jump to either the forum or the folder 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
      if(log.isDebug()) log.debug("businesscontrol (for further jumps) would be:"+bc);
      OLATResourceable popOres = ce.getOLATResourceable();
      if(log.isDebug()) log.debug("OLATResourceable=" + popOres);
      String typeName = popOres.getResourceableTypeName();
      // typeName format: 'path=/test1/test2/readme.txt'
      // First remove prefix 'path='
      String path = typeName.substring("path=".length());
View Full Code Here

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

    }
   
    calCtr = new CourseCalendarController(ureq, wControl, myCal, calSubscription, course);

    boolean focused = false;
    ContextEntry ce = wControl.getBusinessControl().popLauncherContextEntry();
    if ( ce != null ) { // a context path is left for me
      OLATResourceable ores = ce.getOLATResourceable();
      String typeName = ores.getResourceableTypeName();
      String eventId = typeName.substring("path=".length());
      if(eventId.indexOf(':') > 0) {
        eventId = eventId.substring(0, eventId.indexOf(':'));
      }
View Full Code Here

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

    // how to remove initialViewIdentifier and replace by ContextEntry Path?
   
   
    // jump to either the forum or the folder 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
      OLATResourceable ores = ce.getOLATResourceable();
      if (OresHelper.equals(ores, ORES_TOOLFORUM)) {
        // start the forum
        if (nodeForum != null) {
          handleTreeActions(ureq, ACTIVITY_MENUSELECT_FORUM);
          bgTree.setSelectedNode(nodeForum);
View Full Code Here

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

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.