Examples of EffectiveNodeType


Examples of org.apache.jackrabbit.jcr2spi.nodetype.EffectiveNodeType

        }

        // get list of existing nodetypes
        Name[] existingNts = getNodeState().getNodeTypeNames();
        // build effective node type representing primary type including existing mixins
        EffectiveNodeType entExisting = session.getEffectiveNodeTypeProvider().getEffectiveNodeType(existingNts);

        // check if the base type supports adding this mixin
        if (!entExisting.supportsMixin(mixinName)) {
            log.debug(mixin.getName() + ": not supported on node type " + getPrimaryNodeTypeName());
            return false;
        }

        // second, build new effective node type for nts including the new mixin
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.nodetype.EffectiveNodeType

            return definition.getRequiredType();
        }
    }

    private void autoCreateItems() throws RepositoryException {
        EffectiveNodeType effective = dlg.sessionDelegate.getEffectiveNodeTypeProvider().getEffectiveNodeType(this);
        for (PropertyDefinition pd : effective.getAutoCreatePropertyDefinitions()) {
            if (dlg.getProperty(pd.getName()) == null) {
                if (pd.isMultiple()) {
                    dlg.setProperty(pd.getName(), getAutoCreatedValues(pd));
                } else {
                    dlg.setProperty(pd.getName(), getAutoCreatedValue(pd));
                }
            }
        }
        for (NodeDefinition nd : effective.getAutoCreateNodeDefinitions()) {
            if (dlg.getChild(nd.getName()) == null) {
                autoCreateNode(nd);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
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.