docs: public CmsStaticExportData getExportData(HttpServletRequest request, CmsObject cms) {
  
          if (!isStaticExportEnabled()) {
              // export is disabled
              return null;
          }
  
          // build the rfs name for the export "on demand"
          String rfsName = request.getParameter(EXPORT_MARKER);
          if ((rfsName == null)) {
              rfsName = (String)request.getAttribute(EXPORT_ATTRIBUTE_ERROR_REQUEST_URI);
          }
  
          if (request.getHeader(CmsRequestUtil.HEADER_OPENCMS_EXPORT) != null) {
              // this is a request created by the static export and directly send to 404 handler
              // so remove the leading handler identification
              int prefix = rfsName.startsWith(getExportUrlPrefix()) ? getExportUrlPrefix().length() : 0;
              if (prefix > 0) {
                  rfsName = rfsName.substring(prefix);
              } else {
                  return null;
              }
          }
  
          if (!isValidRfsName(rfsName)) {
              // this is not an export request, no further processing is required
              return null;
          }
  
          // store the site root
          String storedSiteRoot = cms.getRequestContext().getSiteRoot();
          try {
              // get the site root according to the HttpServletRequest
              CmsSite site = OpenCms.getSiteManager().matchRequest(request);
              // set the site root of the request context before getting the export data
              cms.getRequestContext().setSiteRoot(site.getSiteRoot());
              // get the export data now
              CmsStaticExportData data = getRfsExportData(cms, rfsName);
  
              // check if we have an export link,
              // only return the data object if we really should export the resource
              if ((data != null) && isExportLink(cms, cms.getRequestContext().removeSiteRoot(data.getVfsName()))) {
                  // if we have an export link return the export data object
                  return data;
              } else {
                  // otherwise if we have a link vfsName which should not be exported
                  // return null for better error handling in the OpenCmsServlet
                  return null;
              }
          } finally {
              // restore the site root
              cms.getRequestContext().setSiteRoot(storedSiteRoot);
          }
      }