Package org.olat.core.id

Examples of org.olat.core.id.OLATResourceable


   * @param message The new info message that will show up on the login screen
   * Synchronized to prevent two users creating or updating the info message property
   * at the same time
   */
  public void setInfoMessage(final String message) { //o_clusterOK synchronized
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(INFO_MSG, KEY);
   
    CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerExecutor(){

      public void execute() {
        PropertyManager pm = PropertyManager.getInstance();
View Full Code Here


    MultiUserEvent mue = new MultiUserEvent(message);
    eb.fireEventToListenersOf(mue, INFO_MESSAGE_ORES);
  }

  private Property getInfoMsgProperty(final String key) {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(INFO_MSG, KEY);
   
    return CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerCallback<Property>() {
   
      public Property execute() {
      PropertyManager pm = PropertyManager.getInstance();
View Full Code Here

   *      org.olat.course.run.userview.UserCourseEnvironment,
   *      org.olat.course.run.userview.NodeEvaluation)
   */
  public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
    if (ne.isAtLeastOneAccessible()) {
      OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
      ModuleConfiguration config = getModuleConfiguration();
      return new SPPeekviewController(ureq, wControl, userCourseEnv, config, ores);     
    } else {
      // use standard peekview
      return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
View Full Code Here

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

    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);
        }
      }

      index.contextPut("hasAssessableNodes", Boolean.TRUE);
View Full Code Here

      // do not offer the temporary bookmark feature since we have no chance to determine
      // which link was from the main frameon the server.
     
      //the stateful config must not be taken into account, as stated above.
      //boolean stateful = config.getBooleanSafe(SPEditController.CONFIG_KEY_STATEFUL);
      OLATResourceable ores = OresHelper.createOLATResourceableInstance(ICourse.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
      spCtr = new SinglePageController(ureq, getWindowControl(), iniframe, courseFolderContainer, fileName, null, allowRelativeLinks.booleanValue(), ores);
      spCtr.setAllowDownload(true);
    } else {
      // no frame, use the bookmark feature
     
      String stateful = (String)config.get(SPEditController.CONFIG_KEY_STATEFUL);
      //clear state if not stateful
      String currentUri = !stateful.equals(Boolean.FALSE.toString()) ? (String) tempstorage.get(KEY_CURRENT_URI) : null;
      boolean showHomeLink = !stateful.equals(SPEditController.KEY_TRUE_WITHOUT_HOMELINK);
     
      OLATResourceable ores = OresHelper.createOLATResourceableInstance(ICourse.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
      spCtr = new SinglePageController(ureq, getWindowControl(), iniframe, courseFolderContainer, fileName, currentUri, allowRelativeLinks.booleanValue(),showHomeLink, ores);           
    }
    // only for inline integration: register for controller event to forward a olatcmd to the course,
    // and also to remember latest position in the script   
    this.listenTo(spCtr);
View Full Code Here

          }
          DispatcherAction.sendNotFound(request.getRequestURI(), response);
          return;
        }
        // handler found e.g. for repo/go
        OLATResourceable ores = jh.getOLATResourceable();
        String title = jh.getTitle();

        // get main window and dynamic tabs
        // brasato:: ChiefController cc = Windows.getWindows(usess).getMainOlatChiefController();
        ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute(AUTHCHIEFCONTROLLER);
View Full Code Here

    }
    main.contextPut("type", typeDisplayText.toString());
    VelocityContainer infopanelVC = createVelocityContainer("infopanel");
    // show how many users are currently using this resource
    String numUsers;
    OLATResourceable ores = repositoryEntry.getOlatResource();
    int cnt = 0;
    OLATResourceable courseRunOres = OresHelper.createOLATResourceableInstance(RunMainController.ORES_TYPE_COURSE_RUN, repositoryEntry.getOlatResource().getResourceableId());
    if (ores != null) cnt = CoordinatorManager.getCoordinator().getEventBus().getListeningIdentityCntFor(courseRunOres);
    numUsers = String.valueOf(cnt);
    infopanelVC.contextPut("numUsers", numUsers);
    // push addtl infos
    main.put("displayform", new DisplayInfoForm("displayform", getTranslator(), repositoryEntry));
View Full Code Here

      showInfo("info.entry.deleted");
      return;
    }
   
    RepositoryManager.getInstance().incrementLaunchCounter(repositoryEntry);
    OLATResourceable ores = repositoryEntry.getOlatResource();
    String displayName = getDisplayName(ureq.getLocale());

    //was brasato:: DTabs dts = getWindowControl().getDTabs();
    DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
    DTab dt = dts.getDTab(ores);
    if (dt == null) {
      // does not yet exist -> create and add
      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.
View Full Code Here

    if (!typeToEdit.supportsEdit()){
      throw new AssertException("Trying to edit repository entry which has no assoiciated editor: "+ typeToEdit);
    }
       

    OLATResourceable ores = repositoryEntry.getOlatResource();
   
    //was brasato:: DTabs dts = getWindowControl().getDTabs();
    DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
    DTab dt = dts.getDTab(ores);
    if (dt == null) {
View Full Code Here

TOP

Related Classes of org.olat.core.id.OLATResourceable

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.