use of org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefinitionImpl in project jackrabbit by apache.
the class CompactNodeTypeDefWriter method write.
/**
* Write one QNodeTypeDefinition to this writer
*
* @param ntd node type definition
* @throws IOException if an I/O error occurs
*/
public void write(QNodeTypeDefinition ntd) throws IOException {
NodeTypeDefinition def = new NodeTypeDefinitionImpl(ntd, npResolver, new ValueFactoryQImpl(QValueFactoryImpl.getInstance(), npResolver));
super.write(def);
}
use of org.apache.jackrabbit.spi.commons.nodetype.NodeTypeDefinitionImpl in project jackrabbit by apache.
the class RepositoryServiceImpl method registerNodeTypes.
/**
* {@inheritDoc}
*/
public void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodeTypeDefinitions, boolean allowUpdate) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException {
SessionInfoImpl sInfo = getSessionInfoImpl(sessionInfo);
NodeTypeManager ntMgr = sInfo.getSession().getWorkspace().getNodeTypeManager();
NodeTypeDefinition[] defs = new NodeTypeDefinition[nodeTypeDefinitions.length];
for (int i = 0; i < nodeTypeDefinitions.length; i++) {
defs[i] = new NodeTypeDefinitionImpl(nodeTypeDefinitions[i], sInfo.getNamePathResolver(), sInfo.getSession().getValueFactory()) {
};
}
ntMgr.registerNodeTypes(defs, allowUpdate);
}
Aggregations