docs: private void modifyEntry(CmsSitemapChange change) throws CmsException {
  
          CmsObject cms = getCmsObject();
          CmsResource entryPage = null;
          CmsResource entryFolder = null;
  
          CmsResource ownRes = null;
          CmsResource defaultFileRes = null;
          try {
              // lock all resources necessary first to avoid doing changes only half way through
  
              if (hasOwnChanges(change)) {
                  ownRes = cms.readResource(change.getEntryId(), CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
                  ensureLock(ownRes);
              }
  
              if (hasDefaultFileChanges(change)) {
                  defaultFileRes = cms.readResource(change.getDefaultFileId(), CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
                  ensureLock(defaultFileRes);
              }
  
              if ((ownRes != null) && ownRes.isFolder()) {
                  entryFolder = ownRes;
              }
  
              if ((ownRes != null) && ownRes.isFile()) {
                  entryPage = ownRes;
              }
  
              if (defaultFileRes != null) {
                  entryPage = defaultFileRes;
              }
  
              if (change.isLeafType()) {
                  entryFolder = entryPage;
              }
  
              updateProperties(cms, ownRes, defaultFileRes, change.getPropertyChanges());
              if (change.hasChangedPosition()) {
                  updateNavPos(ownRes, change);
              }
  
              if (entryFolder != null) {
                  if (change.hasNewParent() || change.hasChangedName()) {
                      String destinationPath;
                      if (change.hasNewParent()) {
                          CmsResource futureParent = cms.readResource(
                              change.getParentId(),
                              CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
                          destinationPath = CmsStringUtil.joinPaths(cms.getSitePath(futureParent), change.getName());
                      } else {
                          destinationPath = CmsStringUtil.joinPaths(
                              CmsResource.getParentFolder(cms.getSitePath(entryFolder)),
                              change.getName());
                      }
                      if (change.isLeafType() && destinationPath.endsWith("/")) {
                          destinationPath = destinationPath.substring(0, destinationPath.length() - 1);
                      }
                      // only if the site-path has really changed
                      if (!cms.getSitePath(entryFolder).equals(destinationPath)) {
                          cms.moveResource(cms.getSitePath(entryFolder), destinationPath);
                      }
                      entryFolder = cms.readResource(
                          entryFolder.getStructureId(),
                          CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
                  }
              }
          } finally {
              if (entryPage != null) {
                  tryUnlock(entryPage);
              }
              if (entryFolder != null) {
                  tryUnlock(entryFolder);
              }
          }
      }