code: public boolean isLocked(Session session, String path)
     {
        String repoPath = session.getRepository().hashCode() + "/" + session.getWorkspace().getName() + "/" + path;
  
        if (nullResourceLocks.get(repoPath) != null)
        {
           return true;
        }
        return false;
     }
docs: Checks if the node is locked.
  
  @param session current session
  @param path node path
  @return true if the node is locked false if not