Class NullResourceLocksHolder


  • public class NullResourceLocksHolder
    extends Object
    Created by The eXo Platform SAS .
    Version:
    $Id: $
    Author:
    Gennady Azarenkov
    • Constructor Detail

      • NullResourceLocksHolder

        public NullResourceLocksHolder()
        Default constructor.
    • Method Detail

      • addLock

        public String addLock​(javax.jcr.Session session,
                              String path)
                       throws javax.jcr.lock.LockException
        Locks the node.
        Parameters:
        session - current session
        path - node path
        Returns:
        thee lock token key
        Throws:
        javax.jcr.lock.LockException - LockException
      • removeLock

        public void removeLock​(javax.jcr.Session session,
                               String path)
        Removes lock from the node.
        Parameters:
        session - current session
        path - nodepath
      • isLocked

        public boolean isLocked​(javax.jcr.Session session,
                                String path)
        Checks if the node is locked.
        Parameters:
        session - current session
        path - node path
        Returns:
        true if the node is locked false if not
      • checkLock

        public void checkLock​(javax.jcr.Session session,
                              String path,
                              List<String> tokens)
                       throws javax.jcr.lock.LockException
        Checks if the node can be unlocked using current tokens.
        Parameters:
        session - current session
        path - node path
        tokens - tokens
        Throws:
        javax.jcr.lock.LockException - LockException