@Override public MutableCachedNode mutable( NodeKey key ) throws NodeNotFoundException, UnsupportedOperationException { return delegate.mutable(key); }
@Override public MutableCachedNode mutable( NodeKey key ) throws NodeNotFoundException, UnsupportedOperationException { return delegate.mutable(key); }
public MutableCachedNode mutableNamespacesNode() { return system.mutable(namespacesKey()); }
public MutableCachedNode mutableVersionStorageNode() { return system.mutable(versionStorageKey()); }
public MutableCachedNode mutableSystemNode() { return system.mutable(systemKey()); }
public MutableCachedNode mutableIndexesNode() { return system.mutable(indexesKey()); }
protected final MutableCachedNode mutable() { return sessionCache().mutable(key); }
public MutableCachedNode mutableNodeTypesNode() { return system.mutable(nodeTypesKey()); }
public MutableCachedNode mutableLocksNode() { return system.mutable(locksKey()); }
public MutableCachedNode mutableLocksNode() { return system.mutable(locksKey()); }
public MutableCachedNode mutableNodeTypesNode() { return system.mutable(nodeTypesKey()); }
public MutableCachedNode mutableVersionStorageNode() { return system.mutable(versionStorageKey()); }
public MutableCachedNode mutableIndexesNode() { return system.mutable(indexesKey()); }
final MutableCachedNode mutableNode( SessionCache cache, CachedNode node, Path path, String... actions ) throws PathNotFoundException, RepositoryException { return cache.mutable(cachedNode(cache, node, path, actions).getKey()); }
final MutableCachedNode mutableNode( SessionCache cache, CachedNode node, Path path, String... actions ) throws PathNotFoundException, RepositoryException { return cache.mutable(cachedNode(cache, node, path, actions).getKey()); }
protected final MutableCachedNode mutableParent() throws RepositoryException { SessionCache cache = sessionCache(); return cache.mutable(parentKey()); }
protected final MutableCachedNode mutableParent() throws RepositoryException { SessionCache cache = sessionCache(); return cache.mutable(parentKey()); }
public MutableCachedNode mutableNode( CachedNode node ) { if (node instanceof MutableCachedNode) return (MutableCachedNode)node; return ((SessionCache)cache).mutable(node.getKey()); }
@Test public void shouldReturnTransientKeysAtOrBelowNodeWithRemovedChild() { NodeKey rootKey = session1.getRootKey(); MutableCachedNode root = session1.mutable(rootKey); SessionCache sessionCache = session(); NodeKey childKey = newKey("x-childA"); MutableCachedNode child = root.createChild(sessionCache, childKey, name("childA"), property("p1", "value A")); session1.destroy(child.getKey()); assertEquals(new HashSet<NodeKey>(Arrays.asList(rootKey, childKey)), session1.getChangedNodeKeysAtOrBelow(root)); } }
@Test public void shouldReturnAllTransientNodeKeys() { NodeKey rootKey = session1.getRootKey(); MutableCachedNode root = session1.mutable(rootKey); NodeKey childAKey = root.createChild(session(), newKey("x-childA"), name("childA"), property("p1", "value A")).getKey(); NodeKey childBKey = root.createChild(session(), newKey("x-childB"), name("childB"), property("p1", "value B")).getKey(); Set<NodeKey> transientNodeKeys = session1.getChangedNodeKeys(); assertEquals(new HashSet<NodeKey>(Arrays.asList(rootKey, childAKey, childBKey)), transientNodeKeys); }