public class NodeTypeCache extends Object
NodeTypeCache
implements a cache for QNodeTypeDefinition
s
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
QNodeTypeDefinition s 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
RepositoryException
public Iterator<QNodeTypeDefinition> getDefinitions(NodeTypeStorage storage, Name[] nodeTypeNames) throws NoSuchNodeTypeException, RepositoryException
QNodeTypeDefinition
s for the given node type
names. The implementation is free to return additional definitions e.g.
dependencies.nodeTypeNames
- NoSuchNodeTypeException
RepositoryException
public void registerNodeTypes(NodeTypeStorage storage, QNodeTypeDefinition[] nodeTypeDefs, boolean allowUpdate) throws RepositoryException
RepositoryException
public 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.