public class NodeTypeCache extends Object
NodeTypeCache implements a cache for QNodeTypeDefinitions
on a userId basis.| Modifier and Type | Method and Description |
|---|---|
Iterator<QNodeTypeDefinition> |
getAllDefinitions(NodeTypeStorage storage)
Returns an Iterator over all node type definitions registered.
|
Iterator<QNodeTypeDefinition> |
getDefinitions(NodeTypeStorage storage,
Name[] nodeTypeNames)
Returns the
QNodeTypeDefinitions for the given node type
names. |
static NodeTypeCache |
getInstance(RepositoryService service,
String userId) |
void |
registerNodeTypes(NodeTypeStorage storage,
QNodeTypeDefinition[] nodeTypeDefs,
boolean allowUpdate) |
void |
unregisterNodeTypes(NodeTypeStorage storage,
Name[] nodeTypeNames) |
NodeTypeStorage |
wrap(NodeTypeStorage storage)
Wraps this
NodeTypeCache around the passed
storage and exposes itself again as a
NodeTypeStorage. |
public static NodeTypeCache getInstance(RepositoryService service, String userId)
service - the repository service.userId - the userId. If null this method will return a
new cache instance for each such call.NodeTypeCache instance for the given
service and userId.public Iterator<QNodeTypeDefinition> getAllDefinitions(NodeTypeStorage storage) throws RepositoryException
RepositoryExceptionpublic Iterator<QNodeTypeDefinition> getDefinitions(NodeTypeStorage storage, Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
QNodeTypeDefinitions for the given node type
names. The implementation is free to return additional definitions e.g.
dependencies.nodeTypeNames - NoSuchNodeTypeExceptionRepositoryExceptionpublic void registerNodeTypes(NodeTypeStorage storage, QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate) throws RepositoryException
RepositoryExceptionpublic void unregisterNodeTypes(NodeTypeStorage storage, Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
public NodeTypeStorage wrap(NodeTypeStorage storage)
NodeTypeCache around the passed
storage and exposes itself again as a
NodeTypeStorage.storage - the node type storage to wrap.Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.