public MockNodeTypeTemplate()

in src/main/java/org/apache/sling/testing/mock/jcr/MockNodeTypeTemplate.java [50:75]


    public MockNodeTypeTemplate(NodeTypeDefinition def, NodeTypeManager ntMgr) {
        // copy ctor
        this.name = def.getName();
        this.superTypeNames = def.getDeclaredSupertypeNames();
        this.primaryItemName = def.getPrimaryItemName();

        this.abstractStatus = def.isAbstract();
        mixin = def.isMixin();
        queryable = def.isQueryable();
        orderableChildNodes = def.hasOrderableChildNodes();

        NodeDefinition[] nodeDefs = def.getDeclaredChildNodeDefinitions();
        if (nodeDefs != null) {
            List<NodeDefinitionTemplate> list = getNodeDefinitionTemplates();
            for (NodeDefinition nodeDef : nodeDefs) {
                list.add(new MockNodeDefinitionTemplate(name, ntMgr, nodeDef));
            }
        }
        PropertyDefinition[] propDefs = def.getDeclaredPropertyDefinitions();
        if (propDefs != null) {
            List<PropertyDefinitionTemplate> list = getPropertyDefinitionTemplates();
            for (PropertyDefinition propDef : propDefs) {
                list.add(new MockPropertyDefinitionTemplate(name, ntMgr, propDef));
            }
        }
    }