Validates the NodeTypeDef and returns an EffectiveNodeType object representing the newly registered node type. The validation includes the following checks:
Supertypes must exist and be registered
Inheritance graph must not be circular
Aggregation of supertypes must not result in name conflicts, ambiguities, etc.
Definitions of auto-created properties must specify a name
Default values in property definitions must satisfy value constraints specified in the same property definition
Definitions of auto-created child-nodes must specify a name
Default node type in child-node definitions must exist and be registered
The aggregation of the default node types in child-node definitions must not result in name conflicts, ambiguities, etc.
Definitions of auto-created child-nodes must not specify default node types which would lead to infinite child node creation (e.g. node type 'A' defines auto-created child node with default node type 'A' ...)
Node types specified as constraints in child-node definitions must exist and be registered
The aggregation of the node types specified as constraints in child-node definitions must not result in name conflicts, ambiguities, etc.
Default node types in child-node definitions must satisfy node type constraints specified in the same child-node definition
@param ntd the definition of the new node type
@return an EffectiveNodeType instance
@throws InvalidNodeTypeDefException
@throws RepositoryException
log.debug("Attempting to regsiter node type named: " + ntd.getName());
// ...and register it
ntreg.registerNodeType(ntd);
}
}
catch(InvalidNodeTypeDefException e) {
log.warn("InvalidNodeTypeDefinitionException caught when trying to add node from CND file: " + cndFileName + ". This will happen if the node type was already registered. " + e);
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.