@Override
  public ContentDocument getContentDocumentByPath(String path, Locale locale) {
    Navigation navigation = this.getNavigation(locale);

    NavigationElement navigationElement = navigation.getNavigationElementByPath(path);
    if (navigationElement == null || StringUtils.isEmpty(navigationElement.getDocumentId())) {
      return null;
    }

    Map<String, String> linkTranslationMap = navigation.getLinkTranslationMap();
    return this.getContentDocument(
        navigationElement.getDocumentId(), locale, createRelativizer(path), linkTranslationMap);
  }
  @Override
  public ContentDocument getContentDocumentById(String id, String relativizer, Locale locale) {
    Navigation navigation = this.getNavigation(locale);

    // check if the document exists
    NavigationElement navigationElement = navigation.getNavigationElementByDocumentId(id);
    if (navigationElement == null || StringUtils.isEmpty(navigationElement.getDocumentId())) {
      return null;
    }

    Map<String, String> linkTranslationMap = navigation.getLinkTranslationMap();
    return this.getContentDocument(id, locale, relativizer, linkTranslationMap);
  }