Examples of HierarchyEntry


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

        }

        // skip the first (skipNum - 1) items without actually retrieving them
        while (--skipNum > 0) {
            pos++;
            HierarchyEntry entry = iter.next();
            // check if item exists but don't build Item instance.
            while (!itemMgr.itemExists(entry)) {
                log.debug("Ignoring nonexistent item " + entry);
                entry = iter.next();
            }
View Full Code Here

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

                    targetEntry = getNodeEntry().getNodeEntry(pe.getName(), pe.getNormalizedIndex(), true);
                }
            } else {
                // rp length > 1
                Path p = getQPath(rp);
                HierarchyEntry entry = session.getHierarchyManager().getHierarchyEntry(p.getCanonicalPath());
                if (entry.denotesNode()) {
                    targetEntry = (NodeEntry) entry;
                } // else:  not a node
            }
        } catch (PathNotFoundException e) {
            // item does not exist -> ignore and return null
View Full Code Here

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

                targetEntry = getNodeEntry().getPropertyEntry(propName, true);
            } else {
                // build and resolve absolute path
                Path p = getQPath(rp).getCanonicalPath();
                try {
                    HierarchyEntry entry = session.getHierarchyManager().getHierarchyEntry(p);
                    if (!entry.denotesNode()) {
                        targetEntry = (PropertyEntry) entry;
                    } // else: not a property
                } catch (PathNotFoundException e) {
                    // ignore -> return null;
                }
View Full Code Here

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

     * @see Operation#persisted()
     */
    public void persisted() {
        if (removeExisting) {
            // invalidate the complete tree -> find root-hierarchy-entry
            HierarchyEntry he = destParentState.getHierarchyEntry();
            while (he.getParent() != null) {
                he = he.getParent();
            }
            he.invalidate(true);
        } else {
            super.persisted();
        }
    }
View Full Code Here

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

        NodeId lockNodeId = lockInfo.getNodeId();
        if (lockNodeId.equals(nId)) {
            lockHoldingState = nodeState;
        } else {
            HierarchyEntry lockedEntry = wspManager.getHierarchyManager().getHierarchyEntry(lockNodeId);
            if (lockedEntry.denotesNode()) {
                try {
                    lockHoldingState = ((NodeEntry) lockedEntry).getNodeState();
                } catch (RepositoryException e) {
                    log.warn("Cannot build LockState");
                    throw new RepositoryException("Cannot build LockState", e);
View Full Code Here

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

               checkIncludesMixReferenceable(nodeInfo);

               // potential uuid conflict
               try {
                   NodeId conflictingId = session.getIdFactory().createNodeId(nodeInfo.getUUID());
                   HierarchyEntry conflicting = session.getHierarchyManager().getHierarchyEntry(conflictingId);
                   // assert that the entry is available
                   conflicting.getItemState();

                   nodeState = resolveUUIDConflict(parent, (NodeEntry) conflicting, nodeInfo);
               } catch (ItemNotFoundException e) {
                   // no conflict: create new with given uuid
                   nodeState = importNode(nodeInfo, parent);
View Full Code Here

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

     * <code>null</code> in case there are no more items.
     */
    private Item prefetchNext() {
        Item nextItem = null;
        while (nextItem == null && iter.hasNext()) {
            HierarchyEntry entry = (HierarchyEntry) iter.next();
            try {
                nextItem = itemMgr.getItem(entry);
            } catch (ItemNotFoundException e) {
                log.debug("Ignoring nonexistent item " + entry);
                // reduce the size ... and try the next one
View Full Code Here

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

        }

        // skip the first (skipNum - 1) items without actually retrieving them
        while (--skipNum > 0) {
            pos++;
            HierarchyEntry entry = (HierarchyEntry) iter.next();
            // check if item exists but don't build Item instance.
            while (!itemMgr.itemExists(entry)) {
                log.debug("Ignoring nonexistent item " + entry);
                entry = (HierarchyEntry) iter.next();
            }
View Full Code Here

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

    /**
     * @see ItemManager#getItem(Path)
     */
    public synchronized Item getItem(Path path)
            throws PathNotFoundException, AccessDeniedException, RepositoryException {
        HierarchyEntry itemEntry = hierMgr.getHierarchyEntry(path);
        try {
            return getItem(itemEntry);
        } catch (ItemNotFoundException infe) {
            throw new PathNotFoundException(LogUtil.safeGetJCRPath(path, session.getPathResolver()));
        }
View Full Code Here

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

     */
    private Node getNodeById(NodeId id) throws ItemNotFoundException, RepositoryException {
        // check sanity of this session
        checkIsAlive();
        try {
            HierarchyEntry hierarchyEntry = getHierarchyManager().getHierarchyEntry(id);
            Item item = getItemManager().getItem(hierarchyEntry);
            if (item.isNode()) {
                return (Node) item;
            } else {
                log.error("NodeId '" + id + " does not point to a Node");
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.