code: private void saveDetailPages(
          List<CmsDetailPageInfo> detailPages,
          CmsResource resource,
          CmsUUID newId,
          CmsClientSitemapEntry updateEntry)
      throws CmsException {
  
          CmsObject cms = getCmsObject();
          if (updateEntry != null) {
              for (CmsDetailPageInfo info : detailPages) {
                  if (info.getId() == null) {
                      updateEntry.setDetailpageTypeName(info.getType());
                      break;
                  }
              }
          }
          CmsDetailPageConfigurationWriter writer = new CmsDetailPageConfigurationWriter(cms, resource);
          writer.updateAndSave(detailPages, newId);
      }
docs: Saves the detail page information of a sitemap to the sitemap's configuration file.<p>
  
  @param detailPages saves the detailpage configuration
  @param resource the configuration file resource
  @param newId the structure id to use for new detail page entries
  @param updateEntry the new detail page entry
  
  @throws CmsException if something goes wrong