code: public Lock getLock() throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException,
        RepositoryException
     {
        checkValid();
  
        LockImpl lock = session.getLockManager().getLock(this);
        if (lock == null)
        {
           throw new LockException("Lock not found " + getPath());
        }
  
        return lock;
  
     }
docs: {@inheritDoc}