Package org.apache.jackrabbit.core.query
Class PropertyTypeRegistry
- java.lang.Object
-
- org.apache.jackrabbit.core.query.PropertyTypeRegistry
-
- All Implemented Interfaces:
NodeTypeRegistryListener
public class PropertyTypeRegistry extends Object implements NodeTypeRegistryListener
ThePropertyTypeRegistry
keeps track of registered node type definitions and its property types. It provides a fast type lookup for a given property name.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PropertyTypeRegistry.TypeMapping
-
Constructor Summary
Constructors Constructor Description PropertyTypeRegistry(NodeTypeRegistry reg)
Creates a newPropertyTypeRegistry
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyTypeRegistry.TypeMapping[]
getPropertyTypes(Name propName)
Returns an array of type mappings for a given property namepropName
.void
nodeTypeRegistered(Name ntName)
Called when a node type has been registered.void
nodeTypeReRegistered(Name ntName)
Called when a node type has been re-registered.void
nodeTypesUnregistered(Collection<Name> names)
Called when a set of node types has been unregistered.
-
-
-
Constructor Detail
-
PropertyTypeRegistry
public PropertyTypeRegistry(NodeTypeRegistry reg)
Creates a newPropertyTypeRegistry
instance. This instance is *not* registered as listener to the NodeTypeRegistry in the constructor!- Parameters:
reg
- theNodeTypeRegistry
where to read the property type information.
-
-
Method Detail
-
getPropertyTypes
public PropertyTypeRegistry.TypeMapping[] getPropertyTypes(Name propName)
Returns an array of type mappings for a given property namepropName
. IfpropName
is not defined as a property in any registered node type an empty array is returned.- Parameters:
propName
- the name of the property.- Returns:
- an array of
TypeMapping
instances.
-
nodeTypeRegistered
public void nodeTypeRegistered(Name ntName)
Description copied from interface:NodeTypeRegistryListener
Called when a node type has been registered.- Specified by:
nodeTypeRegistered
in interfaceNodeTypeRegistryListener
- Parameters:
ntName
- name of the node type that has been registered
-
nodeTypeReRegistered
public void nodeTypeReRegistered(Name ntName)
Description copied from interface:NodeTypeRegistryListener
Called when a node type has been re-registered.- Specified by:
nodeTypeReRegistered
in interfaceNodeTypeRegistryListener
- Parameters:
ntName
- name of the node type that has been registered
-
nodeTypesUnregistered
public void nodeTypesUnregistered(Collection<Name> names)
Description copied from interface:NodeTypeRegistryListener
Called when a set of node types has been unregistered.- Specified by:
nodeTypesUnregistered
in interfaceNodeTypeRegistryListener
- Parameters:
names
- names of the types that have been unregistered
-
-