docs: private CmsClientLock generateClientLock(CmsResource resource) throws CmsException {
  
          CmsObject cms = getCmsObject();
          CmsLock lock = cms.getLock(resource);
          CmsClientLock clientLock = new CmsClientLock();
          clientLock.setLockType(CmsClientLock.LockType.valueOf(lock.getType().getMode()));
          CmsUUID ownerId = lock.getUserId();
          if (!lock.isUnlocked() && (ownerId != null)) {
              clientLock.setLockOwner(cms.readUser(ownerId).getDisplayName(cms, cms.getRequestContext().getLocale()));
              clientLock.setOwnedByUser(cms.getRequestContext().getCurrentUser().getId().equals(ownerId));
          }
          return clientLock;
      }