Document doc = pageEnvelope.getDocument();
String language = doc.getLanguage();
if (!doc.existsInAnyLanguage()) {
throw new DocumentDoesNotExistException("Document " + doc.getId() + " does not exist. Check sitetree, it might need to be reloaded.");
}
List availableLanguages = Arrays.asList(doc.getLanguages());
if (availableLanguages.contains(language)) {
return Collections.unmodifiableMap(Collections.EMPTY_MAP);