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, org.apache.jackrabbit.spi.RepositoryService service, org.apache.jackrabbit.spi.SessionInfo sessionInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.jackrabbit.spi.QNodeDefinitiongetQNodeDefinition(EffectiveNodeType ent, org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.Name nodeTypeName)Returns the applicable child node definition for a child node with the specified name and node type.org.apache.jackrabbit.spi.QNodeDefinitiongetQNodeDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.Name nodeTypeName)Returns the applicable child node definition for a child node with the specified name and node type.org.apache.jackrabbit.spi.QNodeDefinitiongetQNodeDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name nodeName, org.apache.jackrabbit.spi.Name ntName, org.apache.jackrabbit.spi.NodeId nodeId)Returns theQNodeDefinitionfor the specified node state.org.apache.jackrabbit.spi.QPropertyDefinitiongetQPropertyDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name name, int type)Returns the applicable property definition for a property with the specified name and type.org.apache.jackrabbit.spi.QPropertyDefinitiongetQPropertyDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name name, int type, boolean multiValued)Returns the applicable property definition for a property with the specified name, type and multiValued characteristic.org.apache.jackrabbit.spi.QPropertyDefinitiongetQPropertyDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name propertyName, int propertyType, boolean isMultiValued, org.apache.jackrabbit.spi.PropertyId propertyId)Returns theQPropertyDefinitionfor the specified parameters.org.apache.jackrabbit.spi.QPropertyDefinitiongetQPropertyDefinition(org.apache.jackrabbit.spi.Name ntName, org.apache.jackrabbit.spi.Name propName, int type, boolean multiValued)Returns the applicable property definition for a property with the specified name, type and multiValued characteristic.org.apache.jackrabbit.spi.QNodeDefinitiongetRootNodeDefinition()Returns theQNodeDefinitionfor the root node.
-
-
-
Constructor Detail
-
ItemDefinitionProviderImpl
public ItemDefinitionProviderImpl(EffectiveNodeTypeProvider entProvider, org.apache.jackrabbit.spi.RepositoryService service, org.apache.jackrabbit.spi.SessionInfo sessionInfo)
-
-
Method Detail
-
getRootNodeDefinition
public org.apache.jackrabbit.spi.QNodeDefinition getRootNodeDefinition() throws RepositoryExceptionDescription copied from interface:ItemDefinitionProviderReturns theQNodeDefinitionfor the root node.- Specified by:
getRootNodeDefinitionin interfaceItemDefinitionProvider- Returns:
- the
QNodeDefinitionfor the root node. - Throws:
RepositoryException
-
getQNodeDefinition
public org.apache.jackrabbit.spi.QNodeDefinition getQNodeDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name nodeName, org.apache.jackrabbit.spi.Name ntName, org.apache.jackrabbit.spi.NodeId nodeId) throws RepositoryExceptionDescription copied from interface:ItemDefinitionProviderReturns theQNodeDefinitionfor the specified node state.- Specified by:
getQNodeDefinitionin interfaceItemDefinitionProvider- Returns:
- the
QNodeDefinitionfor the specified node state. - Throws:
RepositoryException
-
getQNodeDefinition
public org.apache.jackrabbit.spi.QNodeDefinition getQNodeDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.Name nodeTypeName) throws NoSuchNodeTypeException, ConstraintViolationExceptionDescription copied from interface:ItemDefinitionProviderReturns the applicable child node definition for a child node with the specified name and node type.- Specified by:
getQNodeDefinitionin interfaceItemDefinitionProvider- Returns:
- Throws:
NoSuchNodeTypeExceptionConstraintViolationException- if no applicable child node definition could be found
-
getQNodeDefinition
public org.apache.jackrabbit.spi.QNodeDefinition getQNodeDefinition(EffectiveNodeType ent, org.apache.jackrabbit.spi.Name name, org.apache.jackrabbit.spi.Name nodeTypeName) throws NoSuchNodeTypeException, ConstraintViolationException
Description copied from interface:ItemDefinitionProviderReturns the applicable child node definition for a child node with the specified name and node type.- Specified by:
getQNodeDefinitionin interfaceItemDefinitionProvider- Returns:
- Throws:
NoSuchNodeTypeExceptionConstraintViolationException- if no applicable child node definition could be found
-
getQPropertyDefinition
public org.apache.jackrabbit.spi.QPropertyDefinition getQPropertyDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name propertyName, int propertyType, boolean isMultiValued, org.apache.jackrabbit.spi.PropertyId propertyId) throws RepositoryExceptionDescription copied from interface:ItemDefinitionProviderReturns theQPropertyDefinitionfor the specified parameters.- Specified by:
getQPropertyDefinitionin interfaceItemDefinitionProviderpropertyId- Used to retrieve the definition from the persistent layer if it cannot be determined from the information present.- Returns:
- Throws:
RepositoryException
-
getQPropertyDefinition
public org.apache.jackrabbit.spi.QPropertyDefinition getQPropertyDefinition(org.apache.jackrabbit.spi.Name ntName, org.apache.jackrabbit.spi.Name propName, int type, boolean multiValued) throws ConstraintViolationException, NoSuchNodeTypeExceptionDescription copied from interface:ItemDefinitionProviderReturns 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:
getQPropertyDefinitionin interfaceItemDefinitionProvider- Returns:
- Throws:
ConstraintViolationException- if no applicable property definition could be foundNoSuchNodeTypeException- If no node type with namentNameexists.
-
getQPropertyDefinition
public org.apache.jackrabbit.spi.QPropertyDefinition getQPropertyDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name name, int type, boolean multiValued) throws ConstraintViolationException, NoSuchNodeTypeExceptionDescription copied from interface:ItemDefinitionProviderReturns 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:
getQPropertyDefinitionin interfaceItemDefinitionProvider- Returns:
- Throws:
ConstraintViolationException- if no applicable property definition could be found.NoSuchNodeTypeException
-
getQPropertyDefinition
public org.apache.jackrabbit.spi.QPropertyDefinition getQPropertyDefinition(org.apache.jackrabbit.spi.Name[] parentNodeTypeNames, org.apache.jackrabbit.spi.Name name, int type) throws ConstraintViolationException, NoSuchNodeTypeExceptionDescription copied from interface:ItemDefinitionProviderReturns 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 thanthis 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:
getQPropertyDefinitionin interfaceItemDefinitionProvider- Returns:
- Throws:
ConstraintViolationException- if no applicable property definition could be foundNoSuchNodeTypeException
-
-