@Override public Object getValueInRow( RowAccessor row ) { CachedNode node = row.getNode(index); return node != null ? node.getKey() : null; } });
public Path getPath( CachedNode node ) { NodeKey key = node.getKey(); Path path = paths.get(key); if (path == null) { path = node.getPath(this); paths.put(key, path); // even if null } return path; }
@Override public Object getValueInRow( RowAccessor row ) { CachedNode node = row.getNode(index); return node != null ? node.getKey() : null; } });
@Override public String getIdentifier( CachedNode node ) { // the identifier format varies depending upon the node ... return session.nodeIdentifier(node.getKey()); }
public Path getPath( CachedNode node ) { NodeKey key = node.getKey(); Path path = paths.get(key); if (path == null) { path = node.getPath(this); paths.put(key, path); // even if null } return path; }
@Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof CachedNode) { CachedNode that = (CachedNode)obj; return this.getKey().equals(that.getKey()); } return false; }
@Override public Object getValueInRow( RowAccessor row ) { CachedNode node = row.getNode(indexInRow); if (node == null) return null; return node.getKey().toString(); } };
@Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof CachedNode) { CachedNode that = (CachedNode)obj; return this.getKey().equals(that.getKey()); } return false; }
@Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof CachedNode) { CachedNode that = (CachedNode)obj; return this.getKey().equals(that.getKey()); } return false; }
@Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof CachedNode) { CachedNode that = (CachedNode)obj; return this.getKey().equals(that.getKey()); } return false; }
final MutableCachedNode mutableNode( SessionCache cache, CachedNode node, Path path, String... actions ) throws PathNotFoundException, RepositoryException { return cache.mutable(cachedNode(cache, node, path, actions).getKey()); }
protected String getIdentifier( CachedNode node, NodeKey workspaceRootKey ) { NodeKey key = node.getKey(); if (!key.getSourceKey().equals(workspaceRootKey.getSourceKey())) { // return the whole thing ... return key.toString(); } // return just the identifier part ... return key.getIdentifier(); }
protected String getIdentifier( CachedNode node, NodeKey workspaceRootKey ) { NodeKey key = node.getKey(); if (!key.getSourceKey().equals(workspaceRootKey.getSourceKey())) { // return the whole thing ... return key.toString(); } // return just the identifier part ... return key.getIdentifier(); }
@Override public boolean continueProcessingChildren( CachedNode node, NodeCache cache ) { Name nodePrimaryType = node.getPrimaryType(cache); Set<Name> mixinTypes = node.getMixinTypes(cache); return !node.isExcludedFromSearch(cache) && !node.getKey().getWorkspaceKey().equals(systemWorkspaceKey) && !nodeTypes.isQueryable(nodePrimaryType, mixinTypes); } };
@Override public final boolean includeNode( CachedNode node, NodeCache cache ) { // Include only queryable nodes that are NOT in the system workspace ... Name nodePrimaryType = node.getPrimaryType(cache); Set<Name> mixinTypes = node.getMixinTypes(cache); return !node.isExcludedFromSearch(cache) && !node.getKey().getWorkspaceKey().equals(systemWorkspaceKey) && nodeTypes.isQueryable(nodePrimaryType, mixinTypes); }
@Override public boolean continueProcessingChildren( CachedNode node, NodeCache cache ) { Name nodePrimaryType = node.getPrimaryType(cache); Set<Name> mixinTypes = node.getMixinTypes(cache); return !node.isExcludedFromSearch(cache) && !node.getKey().getWorkspaceKey().equals(systemWorkspaceKey) && !nodeTypes.isQueryable(nodePrimaryType, mixinTypes); } };
protected final String readableLocation( CachedNode node ) { try { return stringFactory().create(node.getPath(cache)); } catch (Throwable t) { return node.getKey().toString(); } }
protected final String readableLocation( CachedNode node ) { try { return stringFactory().create(node.getPath(cache)); } catch (Throwable t) { return node.getKey().toString(); } }
@Override public boolean isCurrentRowValid( Batch batch ) { CachedNode node = batch.getNode(indexInRow); if (node == null) return true; return node.getKey().getWorkspaceKey().equals(workspaceKey); } };
protected ModeShapeLock( CachedNode lockNode, NodeCache cache ) { this.lockKey = lockNode.getKey(); this.lockedNodeKey = lockedNodeKeyFromLockKey(lockKey); this.workspaceName = firstString(lockNode.getProperty(ModeShapeLexicon.WORKSPACE, cache)); this.lockOwner = firstString(lockNode.getProperty(JcrLexicon.LOCK_OWNER, cache)); this.deep = firstBoolean(lockNode.getProperty(JcrLexicon.LOCK_IS_DEEP, cache)); this.sessionScoped = firstBoolean(lockNode.getProperty(ModeShapeLexicon.IS_SESSION_SCOPED, cache)); this.lockToken = firstString(lockNode.getProperty(ModeShapeLexicon.LOCK_TOKEN, cache)); this.lockingSessionId = firstString(lockNode.getProperty(ModeShapeLexicon.LOCKING_SESSION, cache)); this.expiryTime = firstDate(lockNode.getProperty(ModeShapeLexicon.EXPIRATION_DATE, cache)); }