|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager
org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl
public class NodeTypeManagerImpl
A NodeTypeManagerImpl implements a session dependant
NodeTypeManager.
| Field Summary |
|---|
| Fields inherited from interface org.apache.jackrabbit.api.JackrabbitNodeTypeManager |
|---|
TEXT_X_JCR_CND, TEXT_XML |
| Constructor Summary | |
|---|---|
NodeTypeManagerImpl(NodeTypeRegistry ntReg,
SessionImpl session,
DataStore store)
Creates a new NodeTypeManagerImpl instance. |
|
| Method Summary | |
|---|---|
void |
dump(PrintStream ps)
Dumps the state of this instance in a human readable format for diagnostic purposes. |
NodeTypeIterator |
getAllNodeTypes()
|
NodeTypeIterator |
getMixinNodeTypes()
|
NamePathResolver |
getNamePathResolver()
|
NodeDefinitionImpl |
getNodeDefinition(QNodeDefinition def)
|
NodeTypeImpl |
getNodeType(Name name)
|
NodeType |
getNodeType(String nodeTypeName)
|
NodeTypeRegistry |
getNodeTypeRegistry()
|
NodeTypeIterator |
getPrimaryNodeTypes()
|
PropertyDefinitionImpl |
getPropertyDefinition(QPropertyDefinition def)
|
NodeDefinitionImpl |
getRootNodeDefinition()
|
boolean |
hasNodeType(String name)
Checks whether a node type with the given name exists. |
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 |
nodeTypeUnregistered(Name ntName)
Called when a node type has been deregistered. |
NodeType[] |
registerNodeTypes(InputSource in)
Registers the node types defined in the given XML stream. |
NodeType[] |
registerNodeTypes(InputStream in,
String contentType)
Registers the node types defined in the given input stream depending on the content type specified for the stream. |
NodeType[] |
registerNodeTypes(InputStream in,
String contentType,
boolean reregisterExisting)
Registers the node types defined in the given input stream depending on the content type specified for the stream. |
NodeTypeIterator |
registerNodeTypes(NodeTypeDefinition[] definitions,
boolean allowUpdate)
Registers or updates the specified Collection of
NodeTypeDefinition objects. |
void |
unregisterNodeTypes(String[] names)
Unregisters the specified set of node types. |
| Methods inherited from class org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager |
|---|
createNodeDefinitionTemplate, createNodeTypeTemplate, createNodeTypeTemplate, createPropertyDefinitionTemplate, registerNodeType, unregisterNodeType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jcr.nodetype.NodeTypeManager |
|---|
createNodeDefinitionTemplate, createNodeTypeTemplate, createNodeTypeTemplate, createPropertyDefinitionTemplate, registerNodeType, unregisterNodeType |
| Constructor Detail |
|---|
public NodeTypeManagerImpl(NodeTypeRegistry ntReg,
SessionImpl session,
DataStore store)
throws RepositoryException
NodeTypeManagerImpl instance.
ntReg - node type registrysession - current sessionstore - the data store
RepositoryException - If an error occurs.| Method Detail |
|---|
public NodeDefinitionImpl getRootNodeDefinition()
public NodeDefinitionImpl getNodeDefinition(QNodeDefinition def)
getNodeDefinition in class AbstractNodeTypeManagerdef - the QNodeDefinition
public PropertyDefinitionImpl getPropertyDefinition(QPropertyDefinition def)
getPropertyDefinition in class AbstractNodeTypeManagerdef - prop def
public NodeTypeImpl getNodeType(Name name)
throws NoSuchNodeTypeException
getNodeType in class AbstractNodeTypeManagername - node type name
NoSuchNodeTypeException - if the nodetype does not exitpublic NamePathResolver getNamePathResolver()
getNamePathResolver in class AbstractNodeTypeManagerAbstractNodeTypeManager.getNamePathResolver()public NodeTypeRegistry getNodeTypeRegistry()
public NodeType[] registerNodeTypes(InputStream in,
String contentType,
boolean reregisterExisting)
throws IOException,
RepositoryException
in - node type XML streamcontentType - type of the input streamreregisterExisting - flag indicating whether node types should be
reregistered if they already exist
IOException - if the input stream could not be read or parsed
RepositoryException - if the node types are invalid or another
repository error occurspublic void nodeTypeRegistered(Name ntName)
nodeTypeRegistered in interface NodeTypeRegistryListenerntName - name of the node type that has been registeredpublic void nodeTypeReRegistered(Name ntName)
nodeTypeReRegistered in interface NodeTypeRegistryListenerntName - name of the node type that has been registeredpublic void nodeTypeUnregistered(Name ntName)
nodeTypeUnregistered in interface NodeTypeRegistryListenerntName - name of the node type that has been unregistered
public NodeTypeIterator getAllNodeTypes()
throws RepositoryException
getAllNodeTypes in interface NodeTypeManagerRepositoryException
public NodeTypeIterator getPrimaryNodeTypes()
throws RepositoryException
getPrimaryNodeTypes in interface NodeTypeManagerRepositoryException
public NodeTypeIterator getMixinNodeTypes()
throws RepositoryException
getMixinNodeTypes in interface NodeTypeManagerRepositoryException
public NodeType getNodeType(String nodeTypeName)
throws NoSuchNodeTypeException
getNodeType in interface NodeTypeManagerNoSuchNodeTypeException
public NodeType[] registerNodeTypes(InputSource in)
throws SAXException,
RepositoryException
NodeTypeReader and NodeTypeRegistry methods and
heuristically creates the returned node type array. It will also
register any namespaces defined in the input source that have not
already been registered.
registerNodeTypes in interface JackrabbitNodeTypeManagerSAXException
RepositoryException
public NodeType[] registerNodeTypes(InputStream in,
String contentType)
throws IOException,
RepositoryException
registerNodeTypes in interface JackrabbitNodeTypeManagerIOException
RepositoryException
public boolean hasNodeType(String name)
throws RepositoryException
hasNodeType in interface NodeTypeManagerhasNodeType in interface JackrabbitNodeTypeManagername - node type name
true if the named node type exists,
false otherwise
RepositoryException - if the name format is invalid
public NodeTypeIterator registerNodeTypes(NodeTypeDefinition[] definitions,
boolean allowUpdate)
throws InvalidNodeTypeDefinitionException,
NodeTypeExistsException,
UnsupportedRepositoryOperationException,
RepositoryException
Collection of
NodeTypeDefinition objects. This method is used to register
or update a set of node types with mutual dependencies. Returns an
iterator over the resulting NodeType objects.
The effect of the method is "all or nothing"; if an error occurs, no node
types are registered or updated.
Throws an InvalidNodeTypeDefinitionException if a
NodeTypeDefinition within the Collection is
invalid or if the Collection contains an object of a type
other than NodeTypeDefinition.
Throws a NodeTypeExistsException if allowUpdate
is false and a NodeTypeDefinition within the
Collection specifies a node type name that is already
registered.
Throws an UnsupportedRepositoryOperationException if this
implementation does not support node type registration.
registerNodeTypes in interface NodeTypeManagerdefinitions - a collection of NodeTypeDefinitionsallowUpdate - a boolean
InvalidNodeTypeDefinitionException - if a
NodeTypeDefinition within the Collection is
invalid or if the Collection contains an object of a type
other than NodeTypeDefinition.
NodeTypeExistsException - if allowUpdate is
false and a NodeTypeDefinition within the
Collection specifies a node type name that is already
registered.
UnsupportedRepositoryOperationException - if this implementation
does not support node type registration.
RepositoryException - if another error occurs.
public void unregisterNodeTypes(String[] names)
throws UnsupportedRepositoryOperationException,
NoSuchNodeTypeException,
RepositoryException
NoSuchNodeTypeException if one of the names listed is not a registered node type.
Throws an UnsupportedRepositoryOperationException
if this implementation does not support node type registration.
unregisterNodeTypes in interface NodeTypeManagernames - a String array
UnsupportedRepositoryOperationException - if this implementation does not support node type registration.
NoSuchNodeTypeException - if one of the names listed is not a registered node type.
RepositoryException - if another error occurs.public void dump(PrintStream ps)
dump in interface Dumpableps - stream to dump state to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||