Package org.apache.jackrabbit.jcr2spi.state

Examples of org.apache.jackrabbit.jcr2spi.state.ItemState


         * Executes the operations on the repository service.
         */
        private void execute(ChangeLog changeLog) throws RepositoryException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException {
            RepositoryException ex = null;
            try {
                ItemState target = changeLog.getTarget();
                batch = service.createBatch(sessionInfo, target.getId());
                for (Operation op : changeLog.getOperations()) {
                    log.debug("executing " + op.getName());
                    op.accept(this);
                }
            } catch (RepositoryException e) {
View Full Code Here


         * Executes the operations on the repository service.
         */
        private void execute(ChangeLog changeLog) throws RepositoryException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException {
            RepositoryException ex = null;
            try {
                ItemState target = changeLog.getTarget();
                batch = service.createBatch(sessionInfo, target.getId());
                for (Operation op : changeLog.getOperations()) {
                    log.debug("executing " + op.getName());
                    op.accept(this);
                }
            } catch (RepositoryException e) {
View Full Code Here

        }

        // if this entry has not yet been resolved or if it is 'invalidated'
        // all property entries, that are not contained within the specified
        // collection of property names are removed from this NodeEntry.
        ItemState state = internalGetItemState();
        if (containsExtra && (state == null || state.getStatus() == Status.INVALIDATED)) {
            for (Iterator<Name> it = diff.iterator(); it.hasNext();) {
                Name propName = it.next();
                PropertyEntry pEntry = properties.get(propName);
                if (pEntry != null) {
                    pEntry.remove();
View Full Code Here

        }
        if (log.isDebugEnabled()) {
            log.debug("update item " + item);
        }

        ItemState state = ((ItemImpl) item).getItemState();
        // touch the corresponding cache entry
        Item cacheEntry = getItem(state);
        if (cacheEntry == null) {
            // .. or add the item to the cache, if not present yet.
            cacheItem(state, item);
View Full Code Here

    /**
     * @see Dumpable#dump(PrintStream)
     */
    public void dump(PrintStream ps) {
        for (Map.Entry<ItemState, Item> entry : cache.entrySet()) {
            ItemState state = entry.getKey();
            Item item = entry.getValue();
            if (item.isNode()) {
                ps.print("Node: ");
            } else {
                ps.print("Property: ");
View Full Code Here

        Operation an = AddNode.create(getNodeState(), nodeName, nodeTypeName, null);
        session.getSessionItemStateManager().execute(an);

        // finally retrieve the new node
        List<ItemState> addedStates = ((AddNode) an).getAddedStates();
        ItemState nState = addedStates.get(0);
        return (Node) getItemManager().getItem(nState.getHierarchyEntry());
    }
View Full Code Here

         * Executes the operations on the repository service.
         */
        private void execute(ChangeLog changeLog) throws RepositoryException, ConstraintViolationException, AccessDeniedException, ItemExistsException, NoSuchNodeTypeException, UnsupportedRepositoryOperationException, VersionException {
            RepositoryException ex = null;
            try {
                ItemState target = changeLog.getTarget();
                batch = service.createBatch(sessionInfo, target.getId());
                Iterator it = changeLog.getOperations().iterator();
                while (it.hasNext()) {
                    Operation op = (Operation) it.next();
                    log.debug("executing " + op.getName());
                    op.accept(this);
View Full Code Here

        Operation an = AddNode.create(getNodeState(), nodeName, nodeTypeName, null);
        session.getSessionItemStateManager().execute(an);

        // finally retrieve the new node
        List addedStates = ((AddNode) an).getAddedStates();
        ItemState nState = (ItemState) addedStates.get(0);
        return (Node) getItemManager().getItem(nState.getHierarchyEntry());
    }
View Full Code Here

        }

        // if this entry has not yet been resolved or if it is 'invalidated'
        // all property entries, that are not contained within the specified
        // collection of property names are removed from this NodeEntry.
        ItemState state = internalGetItemState();
        if (containsExtra && (state == null || state.getStatus() == Status.INVALIDATED)) {
            for (Iterator it = diff.iterator(); it.hasNext();) {
                Name propName = (Name) it.next();
                PropertyEntry pEntry = properties.get(propName);
                if (pEntry != null) {
                    pEntry.remove();
View Full Code Here

        Operation an = AddNode.create(getNodeState(), nodeName, nodeTypeName, null);
        session.getSessionItemStateManager().execute(an);

        // finally retrieve the new node
        List<ItemState> addedStates = ((AddNode) an).getAddedStates();
        ItemState nState = addedStates.get(0);
        return (Node) getItemManager().getItem(nState.getHierarchyEntry());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.jcr2spi.state.ItemState

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.