// new mixin is already included in primary type
return;
}
// build effective node type of mixin's & primary type in order to detect conflicts
NodeTypeRegistry ntReg = ntMgr.getNodeTypeRegistry();
EffectiveNodeType entExisting;
try {
// existing mixin's
Set mixins = new HashSet(data.getNodeState().getMixinTypeNames());
// build effective node type representing primary type including existing mixin's
entExisting = ntReg.getEffectiveNodeType(primaryTypeName, mixins);
if (entExisting.includesNodeType(mixinName)) {
// new mixin is already included in existing mixin type(s)
return;
}
// add new mixin
mixins.add(mixinName);
// try to build new effective node type (will throw in case of conflicts)
ntReg.getEffectiveNodeType(primaryTypeName, mixins);
} catch (NodeTypeConflictException e) {
throw new ConstraintViolationException(e.getMessage(), e);
}
// do the actual modifications implied by the new mixin;