Class ItemDefinitionProviderImpl
- java.lang.Object
-
- org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl
-
- All Implemented Interfaces:
ItemDefinitionProvider
public class ItemDefinitionProviderImpl extends Object implements ItemDefinitionProvider
ItemDefinitionManagerImpl
...
-
-
Constructor Summary
Constructors Constructor Description ItemDefinitionProviderImpl(EffectiveNodeTypeProvider entProvider, RepositoryService service, SessionInfo sessionInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QNodeDefinition
getQNodeDefinition(EffectiveNodeType ent, Name name, Name nodeTypeName)
Returns the applicable child node definition for a child node with the specified name and node type.QNodeDefinition
getQNodeDefinition(Name[] parentNodeTypeNames, Name name, Name nodeTypeName)
Returns the applicable child node definition for a child node with the specified name and node type.QNodeDefinition
getQNodeDefinition(Name[] parentNodeTypeNames, Name nodeName, Name ntName, NodeId nodeId)
Returns theQNodeDefinition
for the specified node state.QPropertyDefinition
getQPropertyDefinition(Name[] parentNodeTypeNames, Name name, int type)
Returns the applicable property definition for a property with the specified name and type.QPropertyDefinition
getQPropertyDefinition(Name[] parentNodeTypeNames, Name name, int type, boolean multiValued)
Returns the applicable property definition for a property with the specified name, type and multiValued characteristic.QPropertyDefinition
getQPropertyDefinition(Name[] parentNodeTypeNames, Name propertyName, int propertyType, boolean isMultiValued, PropertyId propertyId)
Returns theQPropertyDefinition
for the specified parameters.QPropertyDefinition
getQPropertyDefinition(Name ntName, Name propName, int type, boolean multiValued)
Returns the applicable property definition for a property with the specified name, type and multiValued characteristic.QNodeDefinition
getRootNodeDefinition()
Returns theQNodeDefinition
for the root node.
-
-
-
Constructor Detail
-
ItemDefinitionProviderImpl
public ItemDefinitionProviderImpl(EffectiveNodeTypeProvider entProvider, RepositoryService service, SessionInfo sessionInfo)
-
-
Method Detail
-
getRootNodeDefinition
public QNodeDefinition getRootNodeDefinition() throws RepositoryException
Description copied from interface:ItemDefinitionProvider
Returns theQNodeDefinition
for the root node.- Specified by:
getRootNodeDefinition
in interfaceItemDefinitionProvider
- Returns:
- the
QNodeDefinition
for the root node. - Throws:
RepositoryException
-
getQNodeDefinition
public QNodeDefinition getQNodeDefinition(Name[] parentNodeTypeNames, Name nodeName, Name ntName, NodeId nodeId) throws RepositoryException
Description copied from interface:ItemDefinitionProvider
Returns theQNodeDefinition
for the specified node state.- Specified by:
getQNodeDefinition
in interfaceItemDefinitionProvider
- Returns:
- the
QNodeDefinition
for the specified node state. - Throws:
RepositoryException
-
getQNodeDefinition
public QNodeDefinition getQNodeDefinition(Name[] parentNodeTypeNames, Name name, Name nodeTypeName) throws NoSuchNodeTypeException, ConstraintViolationException
Description copied from interface:ItemDefinitionProvider
Returns the applicable child node definition for a child node with the specified name and node type.- Specified by:
getQNodeDefinition
in interfaceItemDefinitionProvider
- Returns:
- Throws:
NoSuchNodeTypeException
ConstraintViolationException
- if no applicable child node definition could be found
-
getQNodeDefinition
public QNodeDefinition getQNodeDefinition(EffectiveNodeType ent, Name name, Name nodeTypeName) throws NoSuchNodeTypeException, ConstraintViolationException
Description copied from interface:ItemDefinitionProvider
Returns the applicable child node definition for a child node with the specified name and node type.- Specified by:
getQNodeDefinition
in interfaceItemDefinitionProvider
- Returns:
- Throws:
NoSuchNodeTypeException
ConstraintViolationException
- if no applicable child node definition could be found
-
getQPropertyDefinition
public QPropertyDefinition getQPropertyDefinition(Name[] parentNodeTypeNames, Name propertyName, int propertyType, boolean isMultiValued, PropertyId propertyId) throws RepositoryException
Description copied from interface:ItemDefinitionProvider
Returns theQPropertyDefinition
for the specified parameters.- Specified by:
getQPropertyDefinition
in interfaceItemDefinitionProvider
propertyId
- Used to retrieve the definition from the persistent layer if it cannot be determined from the information present.- Returns:
- Throws:
RepositoryException
-
getQPropertyDefinition
public QPropertyDefinition getQPropertyDefinition(Name ntName, Name propName, int type, boolean multiValued) throws ConstraintViolationException, NoSuchNodeTypeException
Description copied from interface:ItemDefinitionProvider
Returns the applicable property definition for a property with the specified name, type and multiValued characteristic. If there more than one applicable definitions that would apply to the given params a ConstraintViolationException is thrown.- Specified by:
getQPropertyDefinition
in interfaceItemDefinitionProvider
- Returns:
- Throws:
ConstraintViolationException
- if no applicable property definition could be foundNoSuchNodeTypeException
- If no node type with namentName
exists.
-
getQPropertyDefinition
public QPropertyDefinition getQPropertyDefinition(Name[] parentNodeTypeNames, Name name, int type, boolean multiValued) throws ConstraintViolationException, NoSuchNodeTypeException
Description copied from interface:ItemDefinitionProvider
Returns the applicable property definition for a property with the specified name, type and multiValued characteristic. If there more than one applicable definitions then the following rules are applied:- named definitions are preferred to residual definitions
- definitions with specific required type are preferred to definitions with required type UNDEFINED
- Specified by:
getQPropertyDefinition
in interfaceItemDefinitionProvider
- Returns:
- Throws:
ConstraintViolationException
- if no applicable property definition could be found.NoSuchNodeTypeException
-
getQPropertyDefinition
public QPropertyDefinition getQPropertyDefinition(Name[] parentNodeTypeNames, Name name, int type) throws ConstraintViolationException, NoSuchNodeTypeException
Description copied from interface:ItemDefinitionProvider
Returns the applicable property definition for a property with the specified name and type. The multiValued flag is not taken into account in the selection algorithm. Other than
this method does not take the multiValued flag into account in the selection algorithm. If there more than one applicable definitions then the following rules are applied:ItemDefinitionProvider.getQPropertyDefinition(Name[], Name, int, boolean)
- named definitions are preferred to residual definitions
- definitions with specific required type are preferred to definitions with required type UNDEFINED
- single-value definitions are preferred to multiple-value definitions
- Specified by:
getQPropertyDefinition
in interfaceItemDefinitionProvider
- Returns:
- Throws:
ConstraintViolationException
- if no applicable property definition could be foundNoSuchNodeTypeException
-
-