Package org.olat.core.id

Examples of org.olat.core.id.OLATResourceable


   * Get the repository handler for this repository entry.
   * @param re
   * @return the handler or null if no appropriate handler could be found
   */
  public RepositoryHandler getRepositoryHandler(RepositoryEntry re) {
    OLATResourceable ores = re.getOlatResource();
    if (ores == null) throw new AssertException("No handler found for resource. ores is null.");
    return getRepositoryHandler(ores.getResourceableTypeName());
  }
View Full Code Here


    }
  }
 
  private CacheWrapper getCacheWrapperFor(Identity identity) {
    // the ores is only for within the cache
    OLATResourceable ores = OresHelper.createOLATResourceableInstanceWithoutCheck("Identity", identity.getKey());
    CacheWrapper cw = courseCache.getOrCreateChildCacheWrapper(ores);
    return cw;
  }
View Full Code Here

   * @param courseNode
   * @return
   */
  public OLATResourceable createOLATResourceableForLocking(Identity assessedIdentity) {       
    String type = "AssessmentManager::Identity";
    OLATResourceable oLATResourceable = OresHelper.createOLATResourceableInstance(type,assessedIdentity.getKey());
    return oLATResourceable;
  }
View Full Code Here

          if (re == null) {
            showWarning("efficiencyStatements.course.noexists");
          } else if (!rm.isAllowedToLaunch(ureq, re)) {
            showWarning("efficiencyStatements.course.noaccess");
          } else {
            OLATResourceable ores = re.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) {
              // does not yet exist -> create and add
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

  /**
   * Acquire lock for hole delete-user workflow
   */
  private Controller acquireDeleteUserLock(UserRequest ureq) {
    OLATResourceable lockResourceable = OresHelper.createOLATResourceableTypeWithoutCheck(TabbedPaneController.class.getName());
    lock = CoordinatorManager.getCoordinator().getLocker().acquireLock(lockResourceable, ureq.getIdentity(), "deleteGroup");
    if (!lock.isSuccess()) {
      String text = getTranslator().translate("error.deleteworkflow.locked.by", new String[]{lock.getOwner().getName()});
      Controller monoCtr = MessageUIFactory.createInfoMessage(ureq, getWindowControl(), null, text);
      return monoCtr;
View Full Code Here

      Iterator<Identity> iter = identities.iterator();     
      while (iter.hasNext()) {
        final Identity identity = iter.next();         
        //o_clusterOK: by ld
        OLATResourceable efficiencyStatementResourceable = am.createOLATResourceableForLocking(identity);
        CoordinatorManager.getCoordinator().getSyncer().doInSync(efficiencyStatementResourceable, new SyncerExecutor() {
          public void execute() {         
            // create temporary user course env
            UserCourseEnvironment uce = AssessmentHelper.createAndInitUserCourseEnvironment(identity, course);
            updateUserEfficiencyStatement(uce, re.getKey(), course, checkForExistingProperty);
View Full Code Here

  /**
   *
   * @see org.olat.repository.handlers.FileHandler#createCopy(org.olat.core.id.OLATResourceable, org.olat.core.gui.UserRequest)
   */
  public OLATResourceable createCopy(OLATResourceable res, UserRequest ureq) {
    OLATResourceable oLATResourceable = super.createCopy(res, ureq);
   
    File sourceFile = FileResourceManager.getInstance().getFileResource(oLATResourceable);
    //unzip sourceFile in a temp dir, delete changelog if any, zip back, delete temp dir
    FileResource tempFr = new FileResource();
    // move file to its new place
View Full Code Here

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

   * Delete checklist.
   * @param checklist
   */
  public void deleteChecklist(final Checklist cl) {
    final DB db = DBFactory.getInstance();
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Checklist.class, cl.getKey());
    CoordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerExecutor() {
        public void execute() {
          Checklist checklist = (Checklist) db.loadObject(cl);
          db.deleteObject(checklist);
        }
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.