else {
String ntName = type.getValues().get(0).getString();
getParentType().checkAddChildNode(name, ntName);
}
ReadOnlyTree addedTree = new ReadOnlyTree(parent, name, after);
EffectiveNodeType addedType = getEffectiveNodeType(addedTree);
addedType.checkMandatoryItems(addedTree);
return new TypeValidator(ntm, new ReadOnlyTree(parent, name, after));
}
catch (RepositoryException e) {
throw new CommitFailedException(
"Cannot add node '" + name + "' at " + parent.getPath(), e);
}