org.apache.jackrabbit.jcr2spi.nodetype
Class EffectiveNodeTypeImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.nodetype.EffectiveNodeTypeImpl
All Implemented Interfaces:
Cloneable, EffectiveNodeType

public class EffectiveNodeTypeImpl
extends Object
implements Cloneable, EffectiveNodeType

An EffectiveNodeType represents one or more NodeTypes as one 'effective' node type where inheritance is resolved.

Instances of EffectiveNodeType are immutable.


Method Summary
 void checkAddNodeConstraints(Name name, ItemDefinitionProvider definitionProvider)
           
 void checkAddNodeConstraints(Name name, QNodeTypeDefinition nodeTypeDefinition, ItemDefinitionProvider definitionProvider)
           
 void checkRemoveItemConstraints(Name name)
           
protected  Object clone()
           
 Name[] getAllNodeTypes()
           
 QNodeDefinition[] getAllQNodeDefinitions()
           
 QPropertyDefinition[] getAllQPropertyDefinitions()
           
 QNodeDefinition[] getAutoCreateQNodeDefinitions()
           
 QPropertyDefinition[] getAutoCreateQPropertyDefinitions()
           
 Name[] getInheritedNodeTypes()
           
 QNodeDefinition[] getMandatoryQNodeDefinitions()
           
 QPropertyDefinition[] getMandatoryQPropertyDefinitions()
           
 Name[] getMergedNodeTypes()
           
 QNodeDefinition[] getNamedQNodeDefinitions(Name name)
           
 QPropertyDefinition[] getNamedQPropertyDefinitions(Name name)
           
 QNodeDefinition[] getUnnamedQNodeDefinitions()
           
 QPropertyDefinition[] getUnnamedQPropertyDefinitions()
           
 boolean hasRemoveNodeConstraint(Name nodeName)
          Returns true if a single node definition matching the specified nodeName is either mandatory or protected.
 boolean hasRemovePropertyConstraint(Name propertyName)
          Returns true if a single property definition matching the specified propertyName is either mandatory or protected.
 boolean includesNodeType(Name nodeTypeName)
          Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type.
 boolean includesNodeTypes(Name[] nodeTypeNames)
          Determines whether this effective node type representation includes (either through inheritance or aggregation) all of the given node types.
 boolean supportsMixin(Name mixin)
          Determines whether this effective node type supports adding the specified mixin.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInheritedNodeTypes

public Name[] getInheritedNodeTypes()
Specified by:
getInheritedNodeTypes in interface EffectiveNodeType
See Also:
EffectiveNodeType.getInheritedNodeTypes()

getAllNodeTypes

public Name[] getAllNodeTypes()
Specified by:
getAllNodeTypes in interface EffectiveNodeType
See Also:
EffectiveNodeType.getAllNodeTypes()

getMergedNodeTypes

public Name[] getMergedNodeTypes()
Specified by:
getMergedNodeTypes in interface EffectiveNodeType
See Also:
EffectiveNodeType.getMergedNodeTypes()

getAllQNodeDefinitions

public QNodeDefinition[] getAllQNodeDefinitions()
Specified by:
getAllQNodeDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getAllQNodeDefinitions()

getAllQPropertyDefinitions

public QPropertyDefinition[] getAllQPropertyDefinitions()
Specified by:
getAllQPropertyDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getAllQPropertyDefinitions()

getAutoCreateQNodeDefinitions

public QNodeDefinition[] getAutoCreateQNodeDefinitions()
Specified by:
getAutoCreateQNodeDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getAutoCreateQNodeDefinitions()

getAutoCreateQPropertyDefinitions

public QPropertyDefinition[] getAutoCreateQPropertyDefinitions()
Specified by:
getAutoCreateQPropertyDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getAutoCreateQPropertyDefinitions()

getMandatoryQPropertyDefinitions

public QPropertyDefinition[] getMandatoryQPropertyDefinitions()
Specified by:
getMandatoryQPropertyDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getMandatoryQPropertyDefinitions()

getMandatoryQNodeDefinitions

public QNodeDefinition[] getMandatoryQNodeDefinitions()
Specified by:
getMandatoryQNodeDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getMandatoryQNodeDefinitions()

getNamedQNodeDefinitions

public QNodeDefinition[] getNamedQNodeDefinitions(Name name)
Specified by:
getNamedQNodeDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getNamedQNodeDefinitions(Name)

getUnnamedQNodeDefinitions

public QNodeDefinition[] getUnnamedQNodeDefinitions()
Specified by:
getUnnamedQNodeDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getUnnamedQNodeDefinitions()

getNamedQPropertyDefinitions

public QPropertyDefinition[] getNamedQPropertyDefinitions(Name name)
Specified by:
getNamedQPropertyDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getNamedQPropertyDefinitions(Name)

getUnnamedQPropertyDefinitions

public QPropertyDefinition[] getUnnamedQPropertyDefinitions()
Specified by:
getUnnamedQPropertyDefinitions in interface EffectiveNodeType
See Also:
EffectiveNodeType.getUnnamedQPropertyDefinitions()

includesNodeType

public boolean includesNodeType(Name nodeTypeName)
Description copied from interface: EffectiveNodeType
Determines whether this effective node type representation includes (either through inheritance or aggregation) the given node type.

Specified by:
includesNodeType in interface EffectiveNodeType
Parameters:
nodeTypeName - name of node type
Returns:
true if the given node type is included, otherwise false

includesNodeTypes

public boolean includesNodeTypes(Name[] nodeTypeNames)
Description copied from interface: EffectiveNodeType
Determines whether this effective node type representation includes (either through inheritance or aggregation) all of the given node types.

Specified by:
includesNodeTypes in interface EffectiveNodeType
Parameters:
nodeTypeNames - array of node type names
Returns:
true if all of the given node types are included, otherwise false

supportsMixin

public boolean supportsMixin(Name mixin)
Description copied from interface: EffectiveNodeType
Determines whether this effective node type supports adding the specified mixin.

Specified by:
supportsMixin in interface EffectiveNodeType
Parameters:
mixin - name of mixin type
Returns:
true if the mixin type is supported, otherwise false
See Also:
EffectiveNodeType.supportsMixin(Name)

checkAddNodeConstraints

public void checkAddNodeConstraints(Name name,
                                    ItemDefinitionProvider definitionProvider)
                             throws ConstraintViolationException
Specified by:
checkAddNodeConstraints in interface EffectiveNodeType
Throws:
ConstraintViolationException
See Also:
EffectiveNodeType.checkAddNodeConstraints(Name, ItemDefinitionProvider)

checkAddNodeConstraints

public void checkAddNodeConstraints(Name name,
                                    QNodeTypeDefinition nodeTypeDefinition,
                                    ItemDefinitionProvider definitionProvider)
                             throws ConstraintViolationException,
                                    NoSuchNodeTypeException
Specified by:
checkAddNodeConstraints in interface EffectiveNodeType
definitionProvider - @throws ConstraintViolationException @throws NoSuchNodeTypeException
Throws:
ConstraintViolationException
NoSuchNodeTypeException
See Also:
EffectiveNodeType.checkAddNodeConstraints(org.apache.jackrabbit.spi.Name,QNodeTypeDefinition, ItemDefinitionProvider)

checkRemoveItemConstraints

public void checkRemoveItemConstraints(Name name)
                                throws ConstraintViolationException
Specified by:
checkRemoveItemConstraints in interface EffectiveNodeType
Throws:
ConstraintViolationException
See Also:
EffectiveNodeType.checkRemoveItemConstraints(Name)

hasRemoveNodeConstraint

public boolean hasRemoveNodeConstraint(Name nodeName)
Description copied from interface: EffectiveNodeType
Returns true if a single node definition matching the specified nodeName is either mandatory or protected.

Specified by:
hasRemoveNodeConstraint in interface EffectiveNodeType
Returns:
true if a single node definition matching the specified nodeName is either mandatory or protected.
See Also:
EffectiveNodeType.hasRemoveNodeConstraint(Name)

hasRemovePropertyConstraint

public boolean hasRemovePropertyConstraint(Name propertyName)
Description copied from interface: EffectiveNodeType
Returns true if a single property definition matching the specified propertyName is either mandatory or protected.

Specified by:
hasRemovePropertyConstraint in interface EffectiveNodeType
Returns:
true if a single property definition matching the specified propertyName is either mandatory or protected.
See Also:
EffectiveNodeType.hasRemovePropertyConstraint(Name)

clone

protected Object clone()
Overrides:
clone in class Object


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.