Search in sources :

Example 11 with NodeDefinitionImpl

use of org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl in project jackrabbit by apache.

the class NodeTypeManagerImpl method getNodeDefinition.

/**
     * Retrieve the <code>NodeDefinition</code> for the given
     * <code>QNodeDefinition</code>.
     *
     * @param def
     * @return
     */
@Override
public NodeDefinition getNodeDefinition(QNodeDefinition def) {
    synchronized (ndCache) {
        NodeDefinition ndi = ndCache.get(def);
        if (ndi == null) {
            ndi = new NodeDefinitionImpl(def, this, getNamePathResolver());
            ndCache.put(def, ndi);
        }
        return ndi;
    }
}
Also used : NodeDefinitionImpl(org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl) QNodeDefinition(org.apache.jackrabbit.spi.QNodeDefinition) NodeDefinition(javax.jcr.nodetype.NodeDefinition)

Aggregations

NodeDefinitionImpl (org.apache.jackrabbit.spi.commons.nodetype.NodeDefinitionImpl)11 RepositoryException (javax.jcr.RepositoryException)7 NodeState (org.apache.jackrabbit.core.state.NodeState)7 ConstraintViolationException (javax.jcr.nodetype.ConstraintViolationException)6 NodeDefinition (javax.jcr.nodetype.NodeDefinition)5 ChildNodeEntry (org.apache.jackrabbit.core.state.ChildNodeEntry)5 PropertyDefinitionImpl (org.apache.jackrabbit.spi.commons.nodetype.PropertyDefinitionImpl)5 HashSet (java.util.HashSet)4 EffectiveNodeType (org.apache.jackrabbit.core.nodetype.EffectiveNodeType)4 NodeTypeConflictException (org.apache.jackrabbit.core.nodetype.NodeTypeConflictException)4 NodeTypeManagerImpl (org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl)4 NodeTypeRegistry (org.apache.jackrabbit.core.nodetype.NodeTypeRegistry)4 Name (org.apache.jackrabbit.spi.Name)4 Value (javax.jcr.Value)3 ValueFormatException (javax.jcr.ValueFormatException)3 PropertyDefinition (javax.jcr.nodetype.PropertyDefinition)3 PropertyId (org.apache.jackrabbit.core.id.PropertyId)3 NodeTypeImpl (org.apache.jackrabbit.core.nodetype.NodeTypeImpl)3 ItemStateException (org.apache.jackrabbit.core.state.ItemStateException)3 PropertyState (org.apache.jackrabbit.core.state.PropertyState)3