public interface CachedNode
Modifier and Type | Interface and Description |
---|---|
static interface |
CachedNode.Properties |
static class |
CachedNode.ReferenceType |
Modifier and Type | Method and Description |
---|---|
Set<NodeKey> |
getAdditionalParentKeys(NodeCache cache)
Get the keys for all of the nodes (other than the
primary parent ) under which this node
appears. |
ChildReferences |
getChildReferences(NodeCache cache)
Get the set of child references for this node.
|
int |
getDepth(NodeCache cache)
Get the depth of this node.
|
NodeKey |
getKey()
Get the key for the node.
|
Set<Name> |
getMixinTypes(NodeCache cache)
Get the set of mixin types for this node.
|
Name |
getName(NodeCache cache)
Get the name for this node, without any same-name-sibiling (SNS) index.
|
NodeKey |
getParentKey(NodeCache cache)
Get the node key for this node's primary parent within this workspace.
|
NodeKey |
getParentKeyInAnyWorkspace(NodeCache cache)
Get the node key for this node's primary parent in any workspace.
|
Path |
getPath(NodeCache cache)
Get the path to this node.
|
Path |
getPath(PathCache pathCache)
Get the path to this node.
|
Map<String,Set<String>> |
getPermissions(NodeCache cache)
Gets the map of privileges by principal name which are in effect for this node.
|
Name |
getPrimaryType(NodeCache cache)
Get the primary type for this node.
|
Iterator<Property> |
getProperties(Collection<?> namePatterns,
NodeCache cache)
Get an iterator over all of the properties of this node that have names matching at least one of the supplied patterns.
|
Iterator<Property> |
getProperties(NodeCache cache)
Get an iterator over all of the node's properties.
|
CachedNode.Properties |
getPropertiesByName(NodeCache cache)
Get the properties collection.
|
Property |
getProperty(Name name,
NodeCache cache)
Get the property with the given name.
|
int |
getPropertyCount(NodeCache cache)
Determine the number of properties that this node contains.
|
ReferrerCounts |
getReferrerCounts(NodeCache cache)
Get a snapshot of the referrers that have REFERENCE and/or WEAK_REFERENCE properties pointing to this node.
|
Set<NodeKey> |
getReferrers(NodeCache cache,
CachedNode.ReferenceType type)
Get the keys of the nodes that have JCR REFERENCE and/or WEAK_REFERENCE properties pointing to this node.
|
Path.Segment |
getSegment(NodeCache cache)
Get the path segment for this node.
|
boolean |
hasACL(NodeCache cache)
Determine if there is an access control list for this node only, not taking into account any possible parents.
|
boolean |
hasProperties(NodeCache cache)
Determine if the node contains one or more properties.
|
boolean |
hasProperty(Name name,
NodeCache cache)
Determine if the node contains a property with the specified name.
|
boolean |
isAtOrBelow(NodeCache cache,
Path path)
Determine if this node is effectively at or below the supplied path.
|
boolean |
isExcludedFromSearch(NodeCache cache)
Determine if this node and *all* of its children should be taken into account when searching/indexing or not.
|
boolean |
isExternal(NodeCache cache)
Determine if this node belongs to an external source (via federation) or is local to the repository.
|
NodeKey getKey()
Name getName(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullNodeNotFoundInParentException
- if this node no longer exists inside the parent node (and perhaps in no other parent)NodeNotFoundException
- if this node no longer existsgetSegment(NodeCache)
,
getPath(NodeCache)
Path.Segment getSegment(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullNodeNotFoundInParentException
- if this node no longer exists inside the parent node (and perhaps in no other parent)NodeNotFoundException
- if this node no longer existsgetName(NodeCache)
,
getPath(NodeCache)
Path getPath(NodeCache cache) throws NodeNotFoundException
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullNodeNotFoundInParentException
- if this node no longer exists inside the parent node (and perhaps in no other parent)NodeNotFoundException
- if this node no longer existsgetName(NodeCache)
,
getSegment(NodeCache)
Path getPath(PathCache pathCache) throws NodeNotFoundException
pathCache
- the cache of paths that can be used to compute the path for any node; may not be nullNodeNotFoundInParentException
- if this node no longer exists inside the parent node (and perhaps in no other parent)NodeNotFoundException
- if this node no longer existsgetName(NodeCache)
,
getSegment(NodeCache)
int getDepth(NodeCache cache) throws NodeNotFoundException
/foo
", 2 for "/foo/bar
", etc.), although this method will likely compute the depth more efficiently
that finding the path and asking for the number of segments.
The depth is calculated based upon the primary parent (and primary path
). This is, although
shared nodes are accessible at multiple paths, only the primary path is used to determine the depth of the node.
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullNodeNotFoundException
- if this node no longer existsNodeKey getParentKey(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullNodeKey getParentKeyInAnyWorkspace(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullSet<NodeKey> getAdditionalParentKeys(NodeCache cache)
primary parent
) under which this node
appears.cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullName getPrimaryType(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullSet<Name> getMixinTypes(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullint getPropertyCount(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullboolean hasProperties(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullboolean hasProperty(Name name, NodeCache cache)
name
- the name of the propertycache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullProperty getProperty(Name name, NodeCache cache)
name
- the name of the propertycache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullNodeNotFoundException
- if this node no longer existsCachedNode.Properties getPropertiesByName(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullIterator<Property> getProperties(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullIterator<Property> getProperties(Collection<?> namePatterns, NodeCache cache)
namePatterns
- the regex patterns or string literals describing the namescache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullChildReferences getChildReferences(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullSet<NodeKey> getReferrers(NodeCache cache, CachedNode.ReferenceType type)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nulltype
- the flag specifying whether nodes with REFERENCE properties and/or WEAK reference properties should be included
in the result; may not be nullReferrerCounts getReferrerCounts(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullboolean isAtOrBelow(NodeCache cache, Path path)
additional parents
, a node has multiple effective paths.cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullpath
- the path to be used for comparison; may not be nullboolean isExcludedFromSearch(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nulltrue
if the node should be indexed, false
otherwiseboolean hasACL(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nulltrue
if this node has an ACL, false
otherwiseMap<String,Set<String>> getPermissions(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nullMap
which contains a set of permission names keyed by principal name or null
if no privileges
are in effect for this node(i.e. this node does not have an ACL). An empty Map
means a node which has an ACL, but
does not have any permissions.boolean isExternal(NodeCache cache)
cache
- the cache to which this node belongs, required in case this node needs to use the cache; may not be nulltrue
if the node is local, false
otherwise.Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.