Package org.olat.core.id

Examples of org.olat.core.id.OLATResourceable


  /**
   * Update checkpoint
   * @param checkpoint
   */
  public void updateCheckpoint(final Checkpoint cp) {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Checkpoint.class, cp.getKey());
    CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerExecutor() {
      public void execute() {
        cp.setLastModified(new Date());
        DBFactory.getInstance().updateObject(cp);
      }
View Full Code Here


  public BusinessGroupMainRunController createRunControllerFor(UserRequest ureq, WindowControl wControl, BusinessGroup businessGroup,
      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();
View Full Code Here

      WindowControl wControl, boolean isGMAdmin, String initialViewIdentifier) {
    String displayName = businessGroup.getName();

    BusinessGroupMainRunController bgMrc = null;

    OLATResourceable ores = businessGroup;
    DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
    //was brasato:: DTabs dts = wControl.getDTabs();
    DTab dt = dts.getDTab(ores);
    if (dt == null) {
      // does not yet exist -> create and add
View Full Code Here

    try {
      super.setUp();
      DBFactory.getJunitInstance().clearDatabase();

      // create course and persist as OLATResourceImpl
      OLATResourceable resourceable = OresHelper.createOLATResourceableInstance("junitConfigCourse", new Long(System.currentTimeMillis()));
      course1 = CourseFactory.createEmptyCourse(resourceable, "JUnitCourseConfig", "JUnitCourseConfig Long Title",
          "objective 1 objective 2 objective 3");
      DBFactory.getInstance().closeSession();
      isSetup = true;
    } catch (Exception e) {
View Full Code Here

      id3 = JunitTestHelper.createAndPersistIdentityAsUser("three");
     
      DB db = DBFactory.getInstance();
      OLATResourceManager rm = OLATResourceManager.getInstance();
      // create course and persist as OLATResourceImpl
      OLATResourceable resourceable = OresHelper.createOLATResourceableInstance("junitcourse",new Long(456));
      course1 =  rm.createOLATResourceInstance(resourceable);
      db.saveObject(course1);
     
     
      DBFactory.getInstance().closeSession();
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
      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());
      if  (path.length() > 0) {
        if(log.isDebug()) log.debug("direct navigation to container-path=" + path);
View Full Code Here

   * @param ureq
   * @return Return false if nothing changed, else true and activateYesNoDialog for save confirmation.
   */
  public boolean checkIfCourseConfigChanged(UserRequest ureq) {   
    if(repositoryEntry.getOlatResource().getResourceableTypeName().equals(CourseModule.getCourseTypeName()) && (repositoryEntryChanged || courseConfigChanged)) {
      OLATResourceable courseRunOres = OresHelper.createOLATResourceableInstance(RunMainController.ORES_TYPE_COURSE_RUN, repositoryEntry.getOlatResource().getResourceableId());
      int cnt = CoordinatorManager.getCoordinator().getEventBus().getListeningIdentityCntFor(courseRunOres) -1; // -1: Remove myself from list;
      if (cnt < 0 ) {
        cnt = 0; // do not show any negative value
      }
      yesNoCommitConfigsCtr = this.activateYesNoDialog(ureq, translate("course.config.changed.title"), translate("course.config.changed.text", String.valueOf(cnt)), yesNoCommitConfigsCtr);
View Full Code Here

    preparedEntry.setDescription(src.getDescription());
    String resName = src.getResourcename();
    if (resName == null) resName = "";
    preparedEntry.setResourcename(resName);
    RepositoryHandler typeToCopy = RepositoryHandlerFactory.getInstance().getRepositoryHandler(src);     
    OLATResourceable newResourceable = typeToCopy.createCopy(sourceEntry.getOlatResource(), ureq);
    if (newResourceable == null) {
      getWindowControl().setError(translator.translate("error.createcopy"));
      fireEvent(ureq, Event.FAILED_EVENT);
      return null;
    }
View Full Code Here

      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
      RepositoryEntry repositoryEntry = ne.getCourseNode().getReferencedRepositoryEntry();
      OLATResourceable ores = repositoryEntry.getOlatResource();
      Long resId = ores.getResourceableId();
      SurveyFileResource fr = new SurveyFileResource();
      fr.overrideResourceableId(resId);
      if(!CoordinatorManager.getCoordinator().getLocker().isLocked(fr, null)) {
        AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
        IQSecurityCallback sec = new CourseIQSecurityCallback(this, am, ureq.getIdentity());
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(':'));
      }
      if  (eventId.length() > 0) {
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.