code: public static void ensureContainingPage(ResourceResolver resolver, String configResourcePath,
        String template, String resourceType, String parentTemplate,
        ConfigurationManagementSettings configurationManagementSettings) {
      Matcher matcher = PAGE_PATH_PATTERN.matcher(configResourcePath);
      if (!matcher.matches()) {
        return;
      }
      String pagePath = matcher.group(1);
      ensurePage(resolver, pagePath, template, resourceType, parentTemplate, configurationManagementSettings);
    }
docs: Ensure that a containing page exists for the given path inside a content page.
  If no containing page exists a page is created with the path before /jcr:content/*.
  If the path does not contain /jcr:content nothing is done.
  @param resolver Resource resolver
  @param configResourcePath Configuration resource path
  @param template Template for page
  @param resourceType Resource type for page (if not template is set)
  @param parentTemplate Template for parent/intermediate pages
  @param configurationManagementSettings Configuration management settings