Package org.olat.core.id.context

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


        throw new StartupException("Configured indexer is not of type RepositoryEntryIndexer", cce);
    }
  }

  public boolean checkAccess(ContextEntry contextEntry, BusinessControl businessControl, Identity identity, Roles roles) {
    ContextEntry bcContextEntry = businessControl.popLauncherContextEntry();
    if (bcContextEntry == null) {
      // no context-entry anymore, the repository entry itself is the context entry,
      // not a course node of course we have access to the course metadata
      return true;
    }
    if (log.isDebug()) log.debug("Start identity=" + identity + "  roles=" + roles);
    Long repositoryKey = contextEntry.getOLATResourceable().getResourceableId();
    RepositoryEntry repositoryEntry = repositoryManager.lookupRepositoryEntry(repositoryKey);
    if (log.isDebug()) log.debug("repositoryEntry=" + repositoryEntry );

    Long nodeId = bcContextEntry.getOLATResourceable().getResourceableId();
    if (log.isDebug()) log.debug("nodeId=" + nodeId );
   
    ICourse course = CourseFactory.loadCourse(repositoryEntry.getOlatResource());
    IdentityEnvironment ienv = new IdentityEnvironment();
    ienv.setIdentity(identity);
View Full Code Here


   
    // Default view
    forumPanel = putInitialPanel(vcListTitles);
    // 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 (isLogDebugEnabled()) logDebug("businesscontrol (for further jumps) would be: ", bc.toString());
      OLATResourceable ores = ce.getOLATResourceable();
      if (isLogDebugEnabled()) logDebug("OLATResourceable= " , ores.toString());
      Long resId = ores.getResourceableId();
      if (resId.longValue() != 0) {
        if (isLogDebugEnabled()) logDebug("messageId=" , ores.getResourceableId().toString());
        currentMsg = fm.findMessage(ores.getResourceableId());
View Full Code Here

  }

  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

  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

    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

      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

      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

    }
    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

    }
   
    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

    // 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

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.