outjectDocumentAndDirectory(doc, getParentNode());
if (templateType != null && !templateType.equals(WikiDocumentDefaults.class.getName())) {
getLog().debug("using custom template class for WikiDocument defaults: " + templateType);
WikiDocumentDefaults defaults;
try {
Class<?> tplClass = Class.forName(templateType);
if (!TemplateRegistry.instance().getTemplateTypes().contains(tplClass)) {
throw new InvalidWikiRequestException("Invalid templateType: " + templateType);