|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.cache.document.AbstractSessionCache
public abstract class AbstractSessionCache
| Nested Class Summary | |
|---|---|
protected static class |
AbstractSessionCache.BasicSaveContext
|
| Nested classes/interfaces inherited from interface org.modeshape.jcr.cache.SessionCache |
|---|
SessionCache.PreSave, SessionCache.SaveContext |
| Field Summary | |
|---|---|
protected WorkspaceCache |
workspaceCache
|
| Constructor Summary | |
|---|---|
protected |
AbstractSessionCache(ExecutionContext context,
WorkspaceCache workspaceCache,
SessionEnvironment sessionContext)
|
| Method Summary | |
|---|---|
void |
addContextData(String key,
String value)
Adds a [key,value] data pair for this cache's context |
NodeKey |
createNodeKey()
Create a new node key for the current source and workspace. |
NodeKey |
createNodeKey(String sourceName,
String identifier)
Create a new node key for the current source and workspace. |
NodeKey |
createNodeKeyWithIdentifier(String identifier)
Create a new node key for the current source and workspace. |
NodeKey |
createNodeKeyWithSource(String sourceName)
Create a new node key for the current source and workspace. |
protected String |
generateIdentifier()
|
Iterator<NodeKey> |
getAllNodeKeys()
Get an iterator over all node keys within this cache. |
Iterator<NodeKey> |
getAllNodeKeysAtAndBelow(NodeKey startingKey)
Get an iterator over all keys for the supplied node and all its descendants. |
ExecutionContext |
getContext()
Get the context for this session. |
CachedNode |
getNode(ChildReference reference)
Get the cached representation of the node as represented by the supplied child reference. |
CachedNode |
getNode(NodeKey key)
Get the cached representation of the node with the supplied node key. |
Set<NodeKey> |
getNodeKeysAtAndBelow(NodeKey nodeKey)
Returns a set with the NodeKeys of the existing nodes (persistent not transient & new) which are at and below the
path of the node with the given key. |
NodeKey |
getRootKey()
Get the node key for the root node. |
NodeCache |
getWorkspace()
Get the cache the reflects the workspace content, without any of the transient, unsaved changes of this session. |
abstract SessionNode |
mutable(NodeKey key)
Get a mutable form of the node with the supplied key. |
WorkspaceCache |
workspaceCache()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.modeshape.jcr.cache.SessionCache |
|---|
clear, destroy, getChangedNodeKeys, getChangedNodeKeysAtOrBelow, hasChanges, isDestroyed, isReadOnly, save, save, save |
| Methods inherited from interface org.modeshape.jcr.cache.NodeCache |
|---|
clear |
| Field Detail |
|---|
protected final WorkspaceCache workspaceCache
| Constructor Detail |
|---|
protected AbstractSessionCache(ExecutionContext context,
WorkspaceCache workspaceCache,
SessionEnvironment sessionContext)
| Method Detail |
|---|
public final ExecutionContext getContext()
SessionCache
getContext in interface SessionCachepublic final WorkspaceCache workspaceCache()
workspaceCache in interface DocumentCache
public final void addContextData(String key,
String value)
SessionCache
addContextData in interface SessionCachekey - the key for the context datavalue - the value for the context datapublic NodeKey createNodeKey()
SessionCache
createNodeKey in interface SessionCachepublic NodeKey createNodeKeyWithIdentifier(String identifier)
SessionCache
createNodeKeyWithIdentifier in interface SessionCacheidentifier - the unique identifier for the key; if null, a generated identifier will be used
public NodeKey createNodeKeyWithSource(String sourceName)
SessionCache
createNodeKeyWithSource in interface SessionCachesourceName - the name (not key) for the source; if null, the key for the current source is used
public NodeKey createNodeKey(String sourceName,
String identifier)
SessionCache
createNodeKey in interface SessionCachesourceName - the name (not key) for the source; if null, the key for the current source is usedidentifier - the unique identifier for the key; if null, a generated identifier will be used
protected String generateIdentifier()
public NodeKey getRootKey()
NodeCache
getRootKey in interface NodeCachepublic NodeCache getWorkspace()
SessionCache
getWorkspace in interface SessionCachepublic CachedNode getNode(NodeKey key)
NodeCache
getNode in interface NodeCachekey - the node key; may not be null
public CachedNode getNode(ChildReference reference)
NodeCachegetNode(reference.getKey());
getNode in interface NodeCachereference - the child node reference; may not be null
public Set<NodeKey> getNodeKeysAtAndBelow(NodeKey nodeKey)
SessionCacheNodeKeys of the existing nodes (persistent not transient & new) which are at and below the
path of the node with the given key. Note that this method will attempt to load each node
getNodeKeysAtAndBelow in interface SessionCachenodeKey - the key of node which will be considered the root node
public abstract SessionNode mutable(NodeKey key)
SessionCache
mutable in interface SessionCachekey - the key for the node; may not be null
public Iterator<NodeKey> getAllNodeKeys()
NodeCache
getAllNodeKeys in interface NodeCachepublic Iterator<NodeKey> getAllNodeKeysAtAndBelow(NodeKey startingKey)
NodeCache
getAllNodeKeysAtAndBelow in interface NodeCachestartingKey - the key for the node to start; may not be null
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||