docs: @SuppressWarnings("deprecation")
      private CmsClientSitemapEntry createNewEntry(String entryPoint, CmsSitemapChange change) throws CmsException {
  
          CmsObject cms = getCmsObject();
          CmsClientSitemapEntry newEntry = null;
          if (change.getParentId() != null) {
              CmsResource parentFolder = cms.readResource(
                  change.getParentId(),
                  CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
              String entryPath = "";
              CmsResource entryFolder = null;
              CmsResource newRes = null;
              byte[] content = null;
              List<CmsProperty> properties = Collections.emptyList();
              CmsResource copyPage = null;
              if (change.getNewCopyResourceId() != null) {
                  copyPage = cms.readResource(change.getNewCopyResourceId(), CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
                  content = cms.readFile(copyPage).getContents();
                  properties = cms.readPropertyObjects(copyPage, false);
              }
              List<CmsProperty> filteredProperties = new ArrayList<CmsProperty>();
              for (CmsProperty property : properties) {
                  boolean filter = false;
                  if (FILTER_PROPERTIES.contains(property.getName())) {
                      filter = true;
  
                  } else {
                      // filter localized versions also
                      for (String filterProp : FILTER_PROPERTIES) {
                          if (property.getName().startsWith(filterProp + "_")) {
                              filter = true;
                              break;
                          }
                      }
                  }
                  if (!filter) {
                      filteredProperties.add(property);
                  }
              }
              properties = filteredProperties;
              if (isRedirectType(change.getNewResourceTypeId())) {
                  entryPath = CmsStringUtil.joinPaths(cms.getSitePath(parentFolder), change.getName());
                  newRes = cms.createResource(
                      entryPath,
                      change.getNewResourceTypeId(),
                      null,
                      Collections.singletonList(
                          new CmsProperty(CmsPropertyDefinition.PROPERTY_TITLE, change.getName(), null)));
                  cms.writePropertyObjects(newRes, generateInheritProperties(change, newRes));
                  applyNavigationChanges(change, newRes);
              } else {
                  String entryFolderPath = CmsStringUtil.joinPaths(cms.getSitePath(parentFolder), change.getName() + "/");
                  boolean idWasNull = change.getEntryId() == null;
                  // we don't really need to create a folder object here anymore.
                  if (idWasNull) {
                      // need this for calculateNavPosition, even though the id will get overwritten
                      change.setEntryId(new CmsUUID());
                  }
  
                  boolean isFunctionDetail = false;
                  boolean isNavigationLevel = false;
                  if (change.getCreateParameter() != null) {
                      if (CmsUUID.isValidUUID(change.getCreateParameter())) {
                          isFunctionDetail = true;
                      } else if (CmsJspNavBuilder.NAVIGATION_LEVEL_FOLDER.equals(change.getCreateParameter())) {
                          isNavigationLevel = true;
                      }
                  }
                  String folderType = CmsResourceTypeFolder.getStaticTypeName();
                  String createSitemapFolderType = change.getCreateSitemapFolderType();
                  if (createSitemapFolderType != null) {
                      folderType = createSitemapFolderType;
                  }
  
                  int folderTypeId = OpenCms.getResourceManager().getResourceType(folderType).getTypeId();
                  entryFolder = new CmsResource(
                      change.getEntryId(),
                      new CmsUUID(),
                      entryFolderPath,
                      folderTypeId,
                      true,
                      0,
                      cms.getRequestContext().getCurrentProject().getUuid(),
                      CmsResource.STATE_NEW,
                      System.currentTimeMillis(),
                      cms.getRequestContext().getCurrentUser().getId(),
                      System.currentTimeMillis(),
                      cms.getRequestContext().getCurrentUser().getId(),
                      CmsResource.DATE_RELEASED_DEFAULT,
                      CmsResource.DATE_EXPIRED_DEFAULT,
                      1,
                      0,
                      System.currentTimeMillis(),
                      0);
                  List<CmsProperty> folderProperties = generateInheritProperties(change, entryFolder);
                  if (isNavigationLevel) {
                      folderProperties.add(
                          new CmsProperty(
                              CmsPropertyDefinition.PROPERTY_DEFAULT_FILE,
                              CmsJspNavBuilder.NAVIGATION_LEVEL_FOLDER,
                              null));
                  }
                  entryFolder = cms.createResource(entryFolderPath, folderTypeId, null, folderProperties);
                  if (createSitemapFolderType != null) {
                      createSitemapContentFolder(cms, entryFolder);
                  }
                  if (idWasNull) {
                      change.setEntryId(entryFolder.getStructureId());
                  }
                  applyNavigationChanges(change, entryFolder);
                  entryPath = CmsStringUtil.joinPaths(entryFolderPath, "index.html");
                  boolean isContainerPage = change.getNewResourceTypeId() == CmsResourceTypeXmlContainerPage.getContainerPageTypeIdSafely();
                  if (isContainerPage && (copyPage != null)) {
  
                      // do *NOT* get this from the cache, because we perform some destructive operation on the XML content
                      CmsXmlContainerPage page = CmsXmlContainerPageFactory.unmarshal(
                          cms,
                          cms.readFile(copyPage),
                          true,
                          true);
                      ensureSingleLocale(page, entryFolder);
                      if (isFunctionDetail) {
                          String functionDetailContainer = getFunctionDetailContainerName(parentFolder);
                          CmsUUID functionStructureId = new CmsUUID(change.getCreateParameter());
                          CmsResource functionRes = cms.readResource(
                              functionStructureId,
                              CmsResourceFilter.IGNORE_EXPIRATION);
                          CmsResource functionFormatter;
                          if (OpenCms.getResourceManager().matchResourceType(
                              CmsResourceTypeFunctionConfig.TYPE_NAME,
                              functionRes.getTypeId())) {
                              functionFormatter = cms.readResource(CmsResourceTypeFunctionConfig.FORMATTER_PATH);
                          } else {
                              functionFormatter = cms.readResource(
                                  CmsResourceTypeFunctionConfig.FORMATTER_PATH,
                                  CmsResourceFilter.ONLY_VISIBLE_NO_DELETED);
                          }
                          addFunctionDetailElement(
                              cms,
                              page,
                              functionDetailContainer,
                              functionStructureId,
                              functionFormatter.getStructureId());
                      }
                      createNewContainerElements(cms, page, entryPath);
                      content = page.marshal();
                  }
                  newRes = cms.createResource(
                      entryPath,
                      copyPage != null ? copyPage.getTypeId() : change.getNewResourceTypeId(),
                      content,
                      properties);
                  cms.writePropertyObjects(newRes, generateOwnProperties(change));
              }
  
              if (entryFolder != null) {
                  tryUnlock(entryFolder);
                  String sitePath = cms.getSitePath(entryFolder);
                  newEntry = toClientEntry(
                      getNavBuilder().getNavigationForResource(sitePath, CmsResourceFilter.ONLY_VISIBLE_NO_DELETED),
                      false);
                  newEntry.setSubEntries(getChildren(sitePath, 1, null), null);
                  newEntry.setChildrenLoadedInitially(true);
              }
              if (newRes != null) {
                  tryUnlock(newRes);
              }
              if (newEntry == null) {
                  newEntry = toClientEntry(
                      getNavBuilder().getNavigationForResource(
                          cms.getSitePath(newRes),
                          CmsResourceFilter.ONLY_VISIBLE_NO_DELETED),
                      false);
              }
              // mark position as not set
              newEntry.setPosition(-1);
              newEntry.setNew(true);
              change.getClipBoardData().getModifications().remove(null);
              change.getClipBoardData().getModifications().put(newEntry.getId(), newEntry);
          }
          return newEntry;
      }