Examples of ContextEntry


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

      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

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

    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

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

      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

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

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

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

  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

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

    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

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

      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

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

        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

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

    }
  }
 
   
  private static WindowControl updateBusinessPath(UserRequest ureq, WindowControl wControl) {
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ureq.getIdentity());
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl);
    return bwControl;
  }
View Full Code Here

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

   * @return
   */
  public Controller createWikiController(UserRequest ureq, WindowControl wControl) {
    // Check for jumping to certain wiki page
    BusinessControl bc = wControl.getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
   
    SubscriptionContext subContext = new SubscriptionContext(ores, WikiManager.WIKI_RESOURCE_FOLDER_NAME);
    boolean isOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
    boolean isGuestOnly = ureq.getUserSession().getRoles().isGuestOnly();
    boolean isResourceOwner = ManagerFactory.getManager().isIdentityPermittedOnResourceable(ureq.getIdentity(), Constants.PERMISSION_ACCESS, ores);
    WikiSecurityCallback callback = new WikiSecurityCallbackImpl(null, isOlatAdmin, isGuestOnly, true, isResourceOwner, subContext);
    if ( ce != null ) { //jump to a certain context
      OLATResourceable ceOres = ce.getOLATResourceable();
      String typeName = ceOres.getResourceableTypeName();
      String page = typeName.substring("page=".length());
      if(page != null && page.endsWith(":0")) {
        page = page.substring(0, page.length() - 2);
      }
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.