org.apache.jackrabbit.jcr2spi.nodetype
Interface ItemDefinitionProvider

All Known Implementing Classes:
ItemDefinitionProviderImpl

public interface ItemDefinitionProvider

ItemDefinitionProvider...


Method Summary
 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 the QNodeDefinition 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 propertType, boolean isMultiValued, PropertyId propertyId)
          Returns the QPropertyDefinition 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 the QNodeDefinition for the root node.
 

Method Detail

getRootNodeDefinition

QNodeDefinition getRootNodeDefinition()
                                      throws RepositoryException
Returns the QNodeDefinition for the root node.

Returns:
the QNodeDefinition for the root node.
Throws:
RepositoryException

getQNodeDefinition

QNodeDefinition getQNodeDefinition(Name[] parentNodeTypeNames,
                                   Name nodeName,
                                   Name ntName,
                                   NodeId nodeId)
                                   throws RepositoryException
Returns the QNodeDefinition for the specified node state.

Parameters:
parentNodeTypeNames -
nodeName -
ntName -
nodeId -
Returns:
the QNodeDefinition for the specified node state.
Throws:
RepositoryException

getQNodeDefinition

QNodeDefinition getQNodeDefinition(Name[] parentNodeTypeNames,
                                   Name name,
                                   Name nodeTypeName)
                                   throws NoSuchNodeTypeException,
                                          ConstraintViolationException
Returns the applicable child node definition for a child node with the specified name and node type.

Parameters:
parentNodeTypeNames -
name -
nodeTypeName -
Returns:
Throws:
NoSuchNodeTypeException
ConstraintViolationException - if no applicable child node definition could be found

getQNodeDefinition

QNodeDefinition getQNodeDefinition(EffectiveNodeType ent,
                                   Name name,
                                   Name nodeTypeName)
                                   throws NoSuchNodeTypeException,
                                          ConstraintViolationException
Returns the applicable child node definition for a child node with the specified name and node type.

Parameters:
ent -
name -
nodeTypeName -
Returns:
Throws:
NoSuchNodeTypeException
ConstraintViolationException - if no applicable child node definition could be found

getQPropertyDefinition

QPropertyDefinition getQPropertyDefinition(Name[] parentNodeTypeNames,
                                           Name propertyName,
                                           int propertType,
                                           boolean isMultiValued,
                                           PropertyId propertyId)
                                           throws RepositoryException
Returns the QPropertyDefinition for the specified parameters.

Parameters:
parentNodeTypeNames -
propertyName -
propertType -
isMultiValued -
propertyId - Used to retrieve the definition from the persistent layer if it cannot be determined from the information present.
Returns:
Throws:
RepositoryException

getQPropertyDefinition

QPropertyDefinition getQPropertyDefinition(Name ntName,
                                           Name propName,
                                           int type,
                                           boolean multiValued)
                                           throws ConstraintViolationException,
                                                  NoSuchNodeTypeException
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.

Parameters:
ntName -
propName -
type -
multiValued -
Returns:
Throws:
NoSuchNodeTypeException - If no node type with name ntName exists.
ConstraintViolationException - if no applicable property definition could be found

getQPropertyDefinition

QPropertyDefinition getQPropertyDefinition(Name[] parentNodeTypeNames,
                                           Name name,
                                           int type,
                                           boolean multiValued)
                                           throws ConstraintViolationException,
                                                  NoSuchNodeTypeException
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:

Parameters:
parentNodeTypeNames -
name -
type -
multiValued -
Returns:
Throws:
ConstraintViolationException - if no applicable property definition could be found.
NoSuchNodeTypeException

getQPropertyDefinition

QPropertyDefinition getQPropertyDefinition(Name[] parentNodeTypeNames,
                                           Name name,
                                           int type)
                                           throws ConstraintViolationException,
                                                  NoSuchNodeTypeException
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 getQPropertyDefinition(Name[], Name, int, boolean) 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:

Parameters:
parentNodeTypeNames -
name -
type -
Returns:
Throws:
ConstraintViolationException - if no applicable property definition could be found
NoSuchNodeTypeException


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