Examples of acquireLock()


Examples of org.olat.core.util.coordinate.Locker.acquireLock()

    long lock1Ac = res11.getLockAquiredTime();
    assertTrue(res11.isSuccess());
    DBFactory.getInstance().closeSession();

    // acquire by another identity must fail
    LockResult res2 = cl.acquireLock(ores, ident2, "abc");
    assertFalse(res2.isSuccess());
    DBFactory.getInstance().closeSession();

    // reacquire same identity
    LockResult res3 = cl.acquireLock(ores, ident, "abc");
View Full Code Here

Examples of org.olat.core.util.coordinate.Locker.acquireLock()

    LockResult res2 = cl.acquireLock(ores, ident2, "abc");
    assertFalse(res2.isSuccess());
    DBFactory.getInstance().closeSession();

    // reacquire same identity
    LockResult res3 = cl.acquireLock(ores, ident, "abc");
    assertTrue(res3.isSuccess());
    DBFactory.getInstance().closeSession();

    // test the admin
    List<LockEntry> entries = cl.adminOnlyGetLockEntries();
View Full Code Here

Examples of org.olat.modules.webFeed.managers.FeedManager.acquireLock()

      itemFormCtr = uiFactory.createItemFormController(ureq, getWindowControl(), currentItem, feed);
      activateModalDialog(itemFormCtr);

    } else if (editButtons != null && editButtons.contains(source)) {
      currentItem = (Item) ((Link) source).getUserObject();
      lock = feedManager.acquireLock(feed, currentItem, getIdentity());
      if (lock.isSuccess()) {

        itemFormCtr = uiFactory.createItemFormController(ureq, getWindowControl(), currentItem, feed);
        activateModalDialog(itemFormCtr);
      } else {
View Full Code Here

Examples of org.olat.modules.webFeed.managers.FeedManager.acquireLock()

        }
      }
    } else if (source == confirmDialogCtr && DialogBoxUIFactory.isYesEvent(event)) {
      // The user confirmed that the item shall be deleted
      Item item = (Item) ((DialogBoxController) source).getUserObject();
      lock = feedManager.acquireLock(feed, item, getIdentity());
      if (lock.isSuccess()) {
        // remove the item from the naviCtr
        naviCtr.remove(item);
        // remove the item also from the helper (cached selection)
        helper.removeItem(item);
View Full Code Here

Examples of org.olat.repository.handlers.RepositoryHandler.acquireLock()

      showError("error.download");
      return;
    }   
    boolean isAlreadyLocked = typeToDownload.isLocked(ores);
    try {     
      lockResult = typeToDownload.acquireLock(ores, ureq.getIdentity());
      if(lockResult==null || (lockResult!=null && lockResult.isSuccess() && !isAlreadyLocked)) {
        MediaResource mr = typeToDownload.getAsMediaResource(ores);
        if(mr!=null) {
          RepositoryManager.getInstance().incrementDownloadCounter(repositoryEntry);
          ureq.getDispatchResult().setResultingMediaResource(mr);
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.