Examples of HierarchyEntry


Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

            } else {
                info = cached.info;
            }

            // Build the hierarchy entry for the item info
            HierarchyEntry entry = createHierarchyEntries(info, anyParent);
            if (entry == null || !entry.denotesNode()) {
                throw new ItemNotFoundException(
                        "HierarchyEntry does not belong to any existing ItemInfo. No ItemState was created.");
            } else {
                // Now we can check whether the item info from the cache is up to date
                long generation = entry.getGeneration();
                if (isOutdated(cached, entry)) {
                    // if not, retrieve the item info from the service and put the whole batch into the cache
                    infos = service.getItemInfos(sessionInfo, nodeId);
                    info = first(infos, cache, generation);
                } else if (infos != null) {
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

            } else {
                info = cached.info;
            }

            // Build the hierarchy entry for the item info
            HierarchyEntry entry = createHierarchyEntries(info, anyParent);

            if (entry == null || entry.denotesNode()) {
                throw new ItemNotFoundException(
                        "HierarchyEntry does not belong to any existing ItemInfo. No ItemState was created.");
            } else {
                if (isOutdated(cached, entry)) {
                    // if not, retreive the item info from the service and put the whole batch into the cache
                    info = service.getPropertyInfo(sessionInfo, propertyId);
                    cache.put(info, entry.getGeneration());
                }

                assertMatchingPath(info, entry);
                return createPropertyState(info, (PropertyEntry) entry);
            }
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

        if (version.getSession() == this) {
            nodeState = (NodeState) ((NodeImpl) version).getItemState();
        } else {
            Path p = getQPath(version.getPath());
            Path parentPath = p.getAncestor(1);
            HierarchyEntry parentEntry = getHierarchyManager().lookup(parentPath);
            if (parentEntry != null) {
                // make sure the parent entry is up to date
                parentEntry.invalidate(false);
            }
            nodeState = getHierarchyManager().getNodeState(p);
        }
        return nodeState;
    }
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

        if (version.getSession() == this) {
            nodeState = (NodeState) ((NodeImpl) version).getItemState();
        } else {
            Path p = getQPath(version.getPath());
            Path parentPath = p.getAncestor(1);
            HierarchyEntry parentEntry = getHierarchyManager().lookup(parentPath);
            if (parentEntry != null) {
                // make sure the parent entry is up to date
                parentEntry.invalidate(false);
            }
            nodeState = getHierarchyManager().getNodeState(p);
        }
        return nodeState;
    }
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

        if (version.getSession() == this) {
            nodeState = (NodeState) ((NodeImpl) version).getItemState();
        } else {
            Path p = getQPath(version.getPath());
            Path parentPath = p.getAncestor(1);
            HierarchyEntry parentEntry = getHierarchyManager().lookup(parentPath);
            if (parentEntry != null) {
                // make sure the parent entry is up to date
                parentEntry.invalidate(false);
            }
            nodeState = getHierarchyManager().getNodeState(p);
        }
        return nodeState;
    }
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

        assert status == STATUS_PENDING;
        status = STATUS_PERSISTED;
       
        // invalidate all references to the removed activity
        for (int i = 0; i < refs.length; i++) {
            HierarchyEntry entry = hMgr.lookup(refs[i]);
            if (entry != null) {
                entry.invalidate(false);
            }
        }

        // invalidate the activities parent
        parent.getNodeEntry().invalidate(false);
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

        if (version.getSession() == this) {
            nodeState = (NodeState) ((NodeImpl) version).getItemState();
        } else {
            Path p = getQPath(version.getPath());
            Path parentPath = p.getAncestor(1);
            HierarchyEntry parentEntry = getHierarchyManager().lookup(parentPath);
            if (parentEntry != null) {
                // make sure the parent entry is up to date
                parentEntry.invalidate(false);
            }
            nodeState = getHierarchyManager().getNodeState(p);
        }
        return nodeState;
    }
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

     *
     * @param state
     * @throws RepositoryException
     */
    private static void updateId(ItemState state) throws RepositoryException {
        HierarchyEntry he = state.getHierarchyEntry();
        while (he.getStatus() != Status.INVALIDATED) {
            he = he.getParent();
            if (he == null) {
                // root reached without intermediate invalidated entry
                return;
            }
        }
        // he is INVALIDATED -> force reloading in order to be aware of id changes
        he.getItemState();
    }
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

            } else {
                info = cached.info;
            }

            // Build the hierarchy entry for the item info
            HierarchyEntry entry = createHierarchyEntries(info, anyParent);
            if (entry == null || !entry.denotesNode()) {
                throw new ItemNotFoundException(
                        "HierarchyEntry does not belong to any existing ItemInfo. No ItemState was created.");
            } else {
                // Now we can check whether the item info from the cache is up to date
                long generation = entry.getGeneration();
                if (isOutdated(cached, entry)) {
                    // if not, retrieve the item info from the service and put the whole batch into the cache
                    infos = service.getItemInfos(sessionInfo, nodeId);
                    info = first(infos, cache, generation);
                } else if (infos != null) {
View Full Code Here

Examples of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry

            } else {
                info = cached.info;
            }

            // Build the hierarchy entry for the item info
            HierarchyEntry entry = createHierarchyEntries(info, anyParent);
            if (entry == null || entry.denotesNode()) {
                throw new ItemNotFoundException(
                        "HierarchyEntry does not belong to any existing ItemInfo. No ItemState was created.");
            } else {
                long generation = entry.getGeneration();
                if (isOutdated(cached, entry)) {
                    // if not, retrieve the item info from the service and put the whole batch into the cache
                    infos = service.getItemInfos(sessionInfo, propertyId);
                    info = first(infos, cache, generation);
                } else if (infos != null) {
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.