Examples of MemoryChildNodeEntry


Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

        for (Map.Entry<String, NodeId> entry : nodes.entrySet()) {
            String name = entry.getKey();
            try {
                JackrabbitNodeState child = new JackrabbitNodeState(
                        this, name, loader.loadBundle(entry.getValue()));
                entries.add(new MemoryChildNodeEntry(name, child));
            } catch (ItemStateException e) {
                warn("Skipping broken child node entry " + name, e);
            }
        }
        return entries;
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

            return map.getEntries();
        } else {
            Segment segment = recordId.getSegment();
            int offset = recordId.getOffset() + RECORD_ID_BYTES;
            RecordId childNodeId = segment.readRecordId(offset);
            return Collections.singletonList(new MemoryChildNodeEntry(
                    childName, new SegmentNodeState(childNodeId)));
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

                return new Iterable<String>() {
                    @Override
                    public Iterator<String> iterator() {
                        PathIterator pi = new PathIterator(filter, indexName, pf);
                        pi.setPathContainsValue(true);
                        pi.enqueue(singletonIterator(new MemoryChildNodeEntry(firstEncoded, key)));
                        return pi;
                    }
                };
            } else {
                return Collections.emptyList();
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

            switch (restriction) {
            case NO_RESTRICTION:
            case EXACT:
            case ALL_CHILDREN:
                nodeIterators.add(Iterators.singletonIterator(
                        new MemoryChildNodeEntry(currentPath, node)));
                parentPath = "";
                break;
            case PARENT:
                if (parent != null) {
                    nodeIterators.add(Iterators.singletonIterator(
                            new MemoryChildNodeEntry(parentPath, parent)));
                    parentPath = "";
                }
                break;
            case DIRECT_CHILDREN:
                nodeIterators.add(node.getChildNodeEntries().iterator());
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

        } else if (childName == Template.MANY_CHILD_NODES) {
            return getChildNodeMap().getEntries();
        } else {
            Segment segment = getSegment();
            RecordId childNodeId = segment.readRecordId(getOffset(0, 1));
            return Collections.singletonList(new MemoryChildNodeEntry(
                    childName, new SegmentNodeState(childNodeId)));
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

                    for (String p : values) {
                        NodeState property = index.getChildNode(p);
                        if (property.exists()) {
                            // we have an entry for this value, so use it
                            it.enqueue(Iterators.singletonIterator(
                                    new MemoryChildNodeEntry("", property)));
                        }
                    }
                }
                return it;
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

    @Override
    public NodeState getChildNode(@Nonnull String name) {
        NodeState child = state.getChildNode(name);
        if (child.exists() && !treePermission.canReadAll()) {
            ChildNodeEntry entry = new MemoryChildNodeEntry(name, child);
            return new WrapChildEntryFunction().apply(entry).getNodeState();
        } else {
            return child;
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

                // tell in advance that the full subtree is readable. Then
                // we also wouldn't need the above getChildNodeCount() call
                // that's somewhat expensive on the DocumentMK.
                return input;
            } else {
                return new MemoryChildNodeEntry(name, secureChild);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

                    for (String p : values) {
                        NodeState property = index.getChildNode(p);
                        if (property.exists()) {
                            // we have an entry for this value, so use it
                            it.enqueue(Iterators.singletonIterator(
                                    new MemoryChildNodeEntry("", property)));
                        }
                    }
                }
                return it;
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.memory.MemoryChildNodeEntry

        } else if (childName == Template.MANY_CHILD_NODES) {
            return getChildNodeMap().getEntries();
        } else {
            Segment segment = getSegment();
            RecordId childNodeId = segment.readRecordId(getOffset(0, 1));
            return Collections.singletonList(new MemoryChildNodeEntry(
                    childName, new SegmentNodeState(childNodeId)));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.