docs: private void addToTempProject(CmsObject adminCms, CmsObject userCms, CmsResource resource, CmsProject tmpProject)
      throws CmsException {
  
          // copy the resource to the project
          adminCms.copyResourceToProject(resource);
  
          // lock the resource in the current project
          CmsLock lock = userCms.getLock(resource);
          // prove is current lock from current but not in current project
          if ((lock != null)
              && lock.isOwnedBy(userCms.getRequestContext().getCurrentUser())
              && !lock.isOwnedInProjectBy(
                  userCms.getRequestContext().getCurrentUser(),
                  userCms.getRequestContext().getCurrentProject())) {
              // file is locked by current user but not in current project
              // change the lock from this file
              userCms.changeLock(resource);
          }
          // lock resource from current user in current project
          userCms.lockResource(resource);
          // get current lock
          lock = userCms.getLock(resource);
      }