docs: private void lock(CmsObject cms, CmsResource resource) throws CmsException {
  
          CmsLock lock = cms.getLock(resource);
          if (lock.isUnlocked()) {
              cms.lockResourceTemporary(resource);
          } else {
              cms.changeLock(resource);
          }
      }