org.apache.jackrabbit.jcr2spi.nodetype
Class ItemDefinitionProviderImpl

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProviderImpl
All Implemented Interfaces:
ItemDefinitionProvider

public class ItemDefinitionProviderImpl
extends Object
implements ItemDefinitionProvider

ItemDefinitionManagerImpl...


Constructor Summary
ItemDefinitionProviderImpl(EffectiveNodeTypeProvider entProvider, RepositoryService service, SessionInfo sessionInfo)
           
 
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(NodeState nodeState)
           
 QNodeDefinition getQNodeDefinition(NodeState parentState, Name name, Name nodeTypeName)
          Returns the applicable child node definition for a child node with the specified name and node type.
 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.
 QPropertyDefinition getQPropertyDefinition(NodeState parentState, Name name, int type)
          Returns the applicable property definition for a property with the specified name and type.
 QPropertyDefinition getQPropertyDefinition(NodeState parentState, Name name, int type, boolean multiValued)
          Returns the applicable property definition for a property with the specified name, type and multiValued characteristic.
 QPropertyDefinition getQPropertyDefinition(PropertyState propertyState)
           
 QNodeDefinition getRootNodeDefinition()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemDefinitionProviderImpl

public ItemDefinitionProviderImpl(EffectiveNodeTypeProvider entProvider,
                                  RepositoryService service,
                                  SessionInfo sessionInfo)
Method Detail

getRootNodeDefinition

public QNodeDefinition getRootNodeDefinition()
                                      throws RepositoryException
Specified by:
getRootNodeDefinition in interface ItemDefinitionProvider
Throws:
RepositoryException

getQNodeDefinition

public QNodeDefinition getQNodeDefinition(NodeState nodeState)
                                   throws RepositoryException
Specified by:
getQNodeDefinition in interface ItemDefinitionProvider
Throws:
RepositoryException

getQNodeDefinition

public QNodeDefinition getQNodeDefinition(NodeState parentState,
                                          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 interface ItemDefinitionProvider
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 interface ItemDefinitionProvider
Returns:
Throws:
NoSuchNodeTypeException
ConstraintViolationException - if no applicable child node definition could be found

getQPropertyDefinition

public QPropertyDefinition getQPropertyDefinition(PropertyState propertyState)
                                           throws RepositoryException
Specified by:
getQPropertyDefinition in interface ItemDefinitionProvider
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 interface ItemDefinitionProvider
Returns:
Throws:
ConstraintViolationException - if no applicable property definition could be found
NoSuchNodeTypeException - If no node type with name ntName exists.

getQPropertyDefinition

public QPropertyDefinition getQPropertyDefinition(NodeState parentState,
                                                  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:

Specified by:
getQPropertyDefinition in interface ItemDefinitionProvider
Returns:
Throws:
ConstraintViolationException - if no applicable property definition could be found
NoSuchNodeTypeException

getQPropertyDefinition

public QPropertyDefinition getQPropertyDefinition(NodeState parentState,
                                                  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 #getApplicablePropertyDefinition(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:

Specified by:
getQPropertyDefinition in interface ItemDefinitionProvider
Returns:
Throws:
ConstraintViolationException - if no applicable property definition could be found
NoSuchNodeTypeException


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