+ " to " + getPath() + " node type " + sysLocFactory.createJCRName(primaryTypeName).getAsString()
+ " is not allowed as child's node type for parent node type ");
}
// Check if node is not protected
NodeDefinitionData childNodeDefinition =
session
.getWorkspace()
.getNodeTypesHolder()
.getChildNodeDefinition(name, primaryTypeName, nodeData().getPrimaryTypeName(),
nodeData().getMixinTypeNames());
if (childNodeDefinition == null)
throw new ConstraintViolationException("Can't find child node definition for "
+ sysLocFactory.createJCRName(name).getAsString() + " in " + getPath());
if (childNodeDefinition.isProtected())
throw new ConstraintViolationException("Can't add protected node "
+ sysLocFactory.createJCRName(name).getAsString() + " to " + getPath());
// Check if versionable ancestor is not checked-in
if (!checkedOut())