code: protected CmsLockActionRecord ensureLock(String sitepath) throws CmsException {
  
          return ensureLock(getCmsObject().readResource(sitepath, CmsResourceFilter.IGNORE_EXPIRATION));
      }
docs: Locks the given resource with a temporary, if not already locked by the current user.
  Will throw an exception if the resource could not be locked for the current user.<p>
  
  @param sitepath the site-path of the resource to lock
  
  @return the assigned lock
  
  @throws CmsException if the resource could not be locked