Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.ItemId


    private NodeId getNodeId(String uri, SessionInfo sessionInfo, boolean nodeIsGone) throws RepositoryException {
        IdURICache cache = getCache(sessionInfo.getWorkspaceName());
        if (cache.containsUri(uri)) {
            // id has been accessed before and is cached
            ItemId id = cache.getItemId(uri);
            if (id.denotesNode()) {
                return (NodeId) id;
            }
        }

        if (nodeIsGone) {
View Full Code Here


     * @inheritDoc
     */
    public PropertyId getPropertyId(String uri, SessionInfo sessionInfo) throws RepositoryException {
        IdURICache cache = getCache(sessionInfo.getWorkspaceName());
        if (cache.containsUri(uri)) {
            ItemId id = cache.getItemId(uri);
            if (!id.denotesNode()) {
                return (PropertyId) id;
            }
        }

        // separate parent uri and property JCRName
View Full Code Here

            String href = DomUtil.getChildTextTrim(evElem, XML_HREF, NAMESPACE);

            int type = EventUtil.getJcrEventType(et[0].getName());
            Path eventPath = null;
            ItemId eventId = null;
            NodeId parentId = null;

            if (href != null) {
                try {
                    eventPath = uriResolver.getQPath(href, sessionInfo);
View Full Code Here

                            Iterator<? extends ItemId> itemIds)
        throws ItemNotFoundException, RepositoryException {
        this.itemMgr = itemMgr;
        List<HierarchyEntry> entries = new ArrayList<HierarchyEntry>();
        while (itemIds.hasNext()) {
            ItemId id = itemIds.next();
            HierarchyEntry entry;
            if (id.denotesNode()) {
                entry = hierarchyMgr.getNodeEntry((NodeId) id);
            } else {
                entry = hierarchyMgr.getPropertyEntry((PropertyId) id);
            }
            entries.add(entry);
View Full Code Here

     * been persisted.
     *
     * @param keepChanges
     */
    public void reload(boolean keepChanges) {
        ItemId id = getWorkspaceId();
        ItemState tmp;
        try {
            if (isNode()) {
                tmp = isf.createNodeState((NodeId) id, (NodeEntry) getHierarchyEntry());
            } else {
View Full Code Here

        // build itemId from the given state and the relative path without
        // making an attempt to retrieve the proper id of the item possibly
        // identified by the resulting id.
        // the server must be able to deal with paths and with proper ids anyway.
        // TODO: 'createNodeId' is basically wrong since isGranted is unspecific for any item.
        ItemId id = idFactory.createNodeId((NodeId) parentState.getWorkspaceId(), relPath);
        return service.isGranted(sessionInfo, id, actions);
    }
View Full Code Here

     */
    public static String safeGetJCRPath(ItemState itemState, PathResolver pathResolver) {
        try {
            return safeGetJCRPath(itemState.getHierarchyEntry().getPath(), pathResolver);
        } catch (RepositoryException e) {
            ItemId id = itemState.getId();
            log.error("failed to convert " + id + " to JCR path.");
            return id.toString();
        }
    }
View Full Code Here

        public boolean equals(Object obj) {
            if (obj == this) {
                return true;
            }
            if (obj instanceof ItemId) {
                ItemId other = (ItemId) obj;
                return equals(other);
            }
            return false;
        }
View Full Code Here

                            Iterator itemIds)
        throws ItemNotFoundException, RepositoryException {
        this.itemMgr = itemMgr;
        List entries = new ArrayList();
        while (itemIds.hasNext()) {
            ItemId id = (ItemId) itemIds.next();
            entries.add(hierarchyMgr.getHierarchyEntry(id));
        }
        iter = entries.iterator();
        size = entries.size();
        pos = 0;
View Full Code Here

        // build itemId from the given state and the relative path without
        // making an attempt to retrieve the proper id of the item possibly
        // identified by the resulting id.
        // the server must be able to deal with paths and with proper ids anyway.
        // TODO: 'createNodeId' is basically wrong since isGranted is unspecific for any item.
        ItemId id = idFactory.createNodeId((NodeId) parentState.getWorkspaceId(), relPath);
        return service.isGranted(sessionInfo, id, actions);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.ItemId

Copyright © 2018 www.massapicom. 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.