|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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,
NamespaceRegistryImpl nsReg,
NamespaceResolver nsResolver)
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()
|
NodeDefinitionImpl |
getNodeDefinition(NodeDefId id)
|
NodeTypeImpl |
getNodeType(QName name)
|
NodeType |
getNodeType(String nodeTypeName)
|
NodeTypeRegistry |
getNodeTypeRegistry()
|
NodeTypeIterator |
getPrimaryNodeTypes()
|
PropertyDefinitionImpl |
getPropertyDefinition(PropDefId id)
|
NodeDefinitionImpl |
getRootNodeDefinition()
|
boolean |
hasNodeType(String name)
Checks if a node type with the given name is registered. |
void |
nodeTypeRegistered(QName ntName)
Called when a node type has been registered. |
void |
nodeTypeReRegistered(QName ntName)
Called when a node type has been re-registered. |
void |
nodeTypeUnregistered(QName 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeTypeManagerImpl(NodeTypeRegistry ntReg, NamespaceRegistryImpl nsReg, NamespaceResolver nsResolver)
NodeTypeManagerImpl
instance.
ntReg
- node type registrynsReg
- namespace registrynsResolver
- namespace resolverMethod Detail |
---|
public NodeDefinitionImpl getRootNodeDefinition()
public NodeDefinitionImpl getNodeDefinition(NodeDefId id)
id
-
public PropertyDefinitionImpl getPropertyDefinition(PropDefId id)
id
-
public NodeTypeImpl getNodeType(QName name) throws NoSuchNodeTypeException
name
-
NoSuchNodeTypeException
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(QName ntName)
nodeTypeRegistered
in interface NodeTypeRegistryListener
ntName
- name of the node type that has been registeredpublic void nodeTypeReRegistered(QName ntName)
nodeTypeReRegistered
in interface NodeTypeRegistryListener
ntName
- name of the node type that has been registeredpublic void nodeTypeUnregistered(QName ntName)
nodeTypeUnregistered
in interface NodeTypeRegistryListener
ntName
- name of the node type that has been unregisteredpublic NodeTypeIterator getAllNodeTypes() throws RepositoryException
getAllNodeTypes
in interface NodeTypeManager
RepositoryException
public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException
getPrimaryNodeTypes
in interface NodeTypeManager
RepositoryException
public NodeTypeIterator getMixinNodeTypes() throws RepositoryException
getMixinNodeTypes
in interface NodeTypeManager
RepositoryException
public NodeType getNodeType(String nodeTypeName) throws NoSuchNodeTypeException
getNodeType
in interface NodeTypeManager
NoSuchNodeTypeException
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.
Registers node types from the given node type XML stream.
registerNodeTypes
in interface JackrabbitNodeTypeManager
in
- node type XML stream
SAXException
- if the XML stream could not be read or parsed
RepositoryException
- if the node types are invalid or another
repository error occurspublic NodeType[] registerNodeTypes(InputStream in, String contentType) throws IOException, RepositoryException
registerNodeTypes
in interface JackrabbitNodeTypeManager
in
- node type streamcontentType
- type of the input stream
IOException
- if the input stream could not be read or parsed
RepositoryException
- if the node types are invalid or another
repository error occurspublic boolean hasNodeType(String name) throws RepositoryException
hasNodeType
in interface JackrabbitNodeTypeManager
name
- node type name
true
if the named node type is registered
false
otherwise
RepositoryException
- if an error occurspublic void dump(PrintStream ps)
dump
in interface Dumpable
ps
- stream to dump state to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |