docs: @SuppressWarnings("unchecked")
      protected void readResourcesFromManifest() throws CmsImportExportException {
  
          String source = null, destination = null, uuidstructure = null, uuidresource = null, userlastmodified = null,
          usercreated = null, flags = null, timestamp = null;
          long datelastmodified = 0, datecreated = 0, datereleased = 0, dateexpired = 0;
  
          List<Node> fileNodes = null, acentryNodes = null;
          Element currentElement = null, currentEntry = null;
          List<CmsProperty> properties = null;
  
          // get list of immutable resources
          List<String> immutableResources = OpenCms.getImportExportManager().getImmutableResources();
          if (immutableResources == null) {
              immutableResources = Collections.emptyList();
          }
          if (LOG.isDebugEnabled()) {
              LOG.debug(
                  Messages.get().getBundle().key(
                      Messages.LOG_IMPORTEXPORT_IMMUTABLE_RESOURCES_SIZE_1,
                      Integer.toString(immutableResources.size())));
          }
          // get list of ignored properties
          List<String> ignoredProperties = OpenCms.getImportExportManager().getIgnoredProperties();
          if (ignoredProperties == null) {
              ignoredProperties = Collections.emptyList();
          }
  
          // get the desired page type for imported pages
          m_convertToXmlPage = OpenCms.getImportExportManager().convertToXmlPage();
  
          try {
              // get all file-nodes
              fileNodes = m_docXml.selectNodes("//" + A_CmsImport.N_FILE);
              int importSize = fileNodes.size();
  
              // walk through all files in manifest
              for (int i = 0; i < fileNodes.size(); i++) {
                  m_report.print(
                      org.opencms.report.Messages.get().container(
                          org.opencms.report.Messages.RPT_SUCCESSION_2,
                          String.valueOf(i + 1),
                          String.valueOf(importSize)),
                      I_CmsReport.FORMAT_NOTE);
                  currentElement = (Element)fileNodes.get(i);
  
                  // <source>
                  source = getChildElementTextValue(currentElement, A_CmsImport.N_SOURCE);
                  // <destination>
                  destination = getChildElementTextValue(currentElement, A_CmsImport.N_DESTINATION);
  
                  // <type>
                  String typeName = getChildElementTextValue(currentElement, A_CmsImport.N_TYPE);
                  I_CmsResourceType type;
                  try {
                      type = OpenCms.getResourceManager().getResourceType(typeName);
                  } catch (CmsLoaderException e) {
                      int plainId;
                      try {
                          plainId = OpenCms.getResourceManager().getResourceType(
                              CmsResourceTypePlain.getStaticTypeName()).getTypeId();
                      } catch (CmsLoaderException e1) {
                          // this should really never happen
                          plainId = CmsResourceTypePlain.getStaticTypeId();
                      }
                      type = OpenCms.getResourceManager().getResourceType(plainId);
                  }
  
                  // <uuidstructure>
                  uuidstructure = getChildElementTextValue(currentElement, A_CmsImport.N_UUIDSTRUCTURE);
  
                  // <uuidresource>
                  if (!type.isFolder()) {
                      uuidresource = getChildElementTextValue(currentElement, A_CmsImport.N_UUIDRESOURCE);
                  } else {
                      uuidresource = null;
                  }
  
                  // <datelastmodified>
                  timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATELASTMODIFIED);
                  if (timestamp != null) {
                      datelastmodified = convertTimestamp(timestamp);
                  } else {
                      datelastmodified = System.currentTimeMillis();
                  }
  
                  // <userlastmodified>
                  userlastmodified = getChildElementTextValue(currentElement, A_CmsImport.N_USERLASTMODIFIED);
                  userlastmodified = OpenCms.getImportExportManager().translateUser(userlastmodified);
  
                  // <datecreated>
                  timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATECREATED);
                  if (timestamp != null) {
                      datecreated = convertTimestamp(timestamp);
                  } else {
                      datecreated = System.currentTimeMillis();
                  }
  
                  // <usercreated>
                  usercreated = getChildElementTextValue(currentElement, A_CmsImport.N_USERCREATED);
                  usercreated = OpenCms.getImportExportManager().translateUser(usercreated);
  
                  // <datereleased>
                  timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATERELEASED);
                  if (timestamp != null) {
                      datereleased = convertTimestamp(timestamp);
                  } else {
                      datereleased = CmsResource.DATE_RELEASED_DEFAULT;
                  }
  
                  // <dateexpired>
                  timestamp = getChildElementTextValue(currentElement, A_CmsImport.N_DATEEXPIRED);
                  if (timestamp != null) {
                      dateexpired = convertTimestamp(timestamp);
                  } else {
                      dateexpired = CmsResource.DATE_EXPIRED_DEFAULT;
                  }
  
                  // <flags>
                  flags = getChildElementTextValue(currentElement, A_CmsImport.N_FLAGS);
  
                  // apply name translation and import path
                  String translatedName = m_cms.getRequestContext().addSiteRoot(m_importPath + destination);
                  if (type.isFolder()) {
                      // ensure folders end with a "/"
                      if (!CmsResource.isFolder(translatedName)) {
                          translatedName += "/";
                      }
                  }
  
                  // check if this resource is immutable
                  boolean resourceNotImmutable = checkImmutable(translatedName, immutableResources);
                  translatedName = m_cms.getRequestContext().removeSiteRoot(translatedName);
                  // if the resource is not immutable and not on the exclude list, import it
                  if (resourceNotImmutable) {
                      // print out the information to the report
                      m_report.print(Messages.get().container(Messages.RPT_IMPORTING_0), I_CmsReport.FORMAT_NOTE);
                      m_report.print(
                          org.opencms.report.Messages.get().container(
                              org.opencms.report.Messages.RPT_ARGUMENT_1,
                              translatedName));
                      m_report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));
                      // get all properties
                      properties = readPropertiesFromManifest(currentElement, ignoredProperties);
  
                      boolean exists = m_cms.existsResource(translatedName, CmsResourceFilter.ALL);
  
                      // import the resource
                      CmsResource res = importResource(
                          source,
                          translatedName,
                          type,
                          uuidstructure,
                          uuidresource,
                          datelastmodified,
                          userlastmodified,
                          datecreated,
                          usercreated,
                          datereleased,
                          dateexpired,
                          flags,
                          properties);
  
                      if (res != null) {
                          // only set permissions if the resource did not exists or if the keep permissions flag is not set
                          if (!exists || !m_keepPermissions) {
                              // if the resource was imported add the access control entries if available
                              List<CmsAccessControlEntry> aceList = new ArrayList<CmsAccessControlEntry>();
  
                              // write all imported access control entries for this file
                              acentryNodes = currentElement.selectNodes("*/" + A_CmsImport.N_ACCESSCONTROL_ENTRY);
  
                              // collect all access control entries
                              for (int j = 0; j < acentryNodes.size(); j++) {
                                  currentEntry = (Element)acentryNodes.get(j);
  
                                  // get the data of the access control entry
                                  String id = getChildElementTextValue(
                                      currentEntry,
                                      A_CmsImport.N_ACCESSCONTROL_PRINCIPAL);
                                  String principalId = new CmsUUID().toString();
                                  String principal = id.substring(id.indexOf('.') + 1, id.length());
  
                                  try {
                                      if (id.startsWith(I_CmsPrincipal.PRINCIPAL_GROUP)) {
                                          principal = OpenCms.getImportExportManager().translateGroup(principal);
                                          principalId = m_cms.readGroup(principal).getId().toString();
                                      } else if (id.startsWith(I_CmsPrincipal.PRINCIPAL_USER)) {
                                          principal = OpenCms.getImportExportManager().translateUser(principal);
                                          principalId = m_cms.readUser(principal).getId().toString();
                                      } else if (id.startsWith(CmsRole.PRINCIPAL_ROLE)) {
                                          principalId = CmsRole.valueOfRoleName(principal).getId().toString();
                                      } else if (id.equalsIgnoreCase(CmsAccessControlEntry.PRINCIPAL_ALL_OTHERS_NAME)) {
                                          principalId = CmsAccessControlEntry.PRINCIPAL_ALL_OTHERS_ID.toString();
                                      } else if (id.equalsIgnoreCase(
                                          CmsAccessControlEntry.PRINCIPAL_OVERWRITE_ALL_NAME)) {
                                          principalId = CmsAccessControlEntry.PRINCIPAL_OVERWRITE_ALL_ID.toString();
                                      } else {
                                          if (LOG.isWarnEnabled()) {
                                              LOG.warn(
                                                  Messages.get().getBundle().key(
                                                      Messages.LOG_IMPORTEXPORT_ERROR_IMPORTING_ACE_1,
                                                      id));
                                          }
                                      }
  
                                      String acflags = getChildElementTextValue(currentEntry, A_CmsImport.N_FLAGS);
  
                                      String allowed = ((Element)currentEntry.selectNodes("./"
                                          + A_CmsImport.N_ACCESSCONTROL_PERMISSIONSET
                                          + "/"
                                          + A_CmsImport.N_ACCESSCONTROL_ALLOWEDPERMISSIONS).get(0)).getTextTrim();
  
                                      String denied = ((Element)currentEntry.selectNodes("./"
                                          + A_CmsImport.N_ACCESSCONTROL_PERMISSIONSET
                                          + "/"
                                          + A_CmsImport.N_ACCESSCONTROL_DENIEDPERMISSIONS).get(0)).getTextTrim();
  
                                      // add the entry to the list
                                      aceList.add(
                                          getImportAccessControlEntry(res, principalId, allowed, denied, acflags));
                                  } catch (CmsException e) {
                                      // user or group of ACE might not exist in target system, ignore ACE
                                      if (LOG.isWarnEnabled()) {
                                          LOG.warn(
                                              Messages.get().getBundle().key(
                                                  Messages.LOG_IMPORTEXPORT_ERROR_IMPORTING_ACE_1,
                                                  translatedName),
                                              e);
                                      }
                                      m_report.println(e);
                                      m_report.addError(e);
                                  }
                              }
                              importAccessControlEntries(res, aceList);
                          }
  
                          // Add the relations for the resource
                          importRelations(res, currentElement);
  
                          if (OpenCms.getResourceManager().getResourceType(
                              res.getTypeId()) instanceof I_CmsLinkParseable) {
                              // store for later use
                              m_parseables.add(res);
                          }
  
                          if (LOG.isInfoEnabled()) {
                              LOG.info(
                                  Messages.get().getBundle().key(
                                      Messages.LOG_IMPORTING_4,
                                      new Object[] {
                                          String.valueOf(i + 1),
                                          String.valueOf(importSize),
                                          translatedName,
                                          destination}));
                          }
                      } else {
                          // resource import failed, since no CmsResource was created
                          m_report.print(Messages.get().container(Messages.RPT_SKIPPING_0), I_CmsReport.FORMAT_NOTE);
                          m_report.println(
                              org.opencms.report.Messages.get().container(
                                  org.opencms.report.Messages.RPT_ARGUMENT_1,
                                  translatedName));
  
                          if (LOG.isInfoEnabled()) {
                              LOG.info(
                                  Messages.get().getBundle().key(
                                      Messages.LOG_SKIPPING_3,
                                      String.valueOf(i + 1),
                                      String.valueOf(importSize),
                                      translatedName));
                          }
                      }
  
                  } else {
                      // skip the file import, just print out the information to the report
  
                      m_report.print(Messages.get().container(Messages.RPT_SKIPPING_0), I_CmsReport.FORMAT_NOTE);
                      m_report.println(
                          org.opencms.report.Messages.get().container(
                              org.opencms.report.Messages.RPT_ARGUMENT_1,
                              translatedName));
  
                      if (LOG.isInfoEnabled()) {
                          LOG.info(
                              Messages.get().getBundle().key(
                                  Messages.LOG_SKIPPING_3,
                                  String.valueOf(i + 1),
                                  String.valueOf(importSize),
                                  translatedName));
                      }
                  }
              }
          } catch (Exception e) {
              m_report.println(e);
              m_report.addError(e);
  
              CmsMessageContainer message = Messages.get().container(
                  Messages.ERR_IMPORTEXPORT_ERROR_IMPORTING_RESOURCES_0);
              if (LOG.isDebugEnabled()) {
                  LOG.debug(message.key(), e);
              }
  
              throw new CmsImportExportException(message, e);
          }
      }