Search in sources :

Example 11 with HierarchyEntry

use of org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry in project jackrabbit by apache.

the class RemoveActivity method persisted.

/**
     * Invalidates the <code>NodeState</code> that has been updated and all
     * its descendants. Second, the parent state gets invalidated.
     *
     * @see org.apache.jackrabbit.jcr2spi.operation.Operation#persisted()
     */
public void persisted() {
    assert status == STATUS_PENDING;
    status = STATUS_PERSISTED;
    // invalidate all references to the removed activity
    while (refs.hasNext()) {
        HierarchyEntry entry = hMgr.lookup(refs.next());
        if (entry != null) {
            entry.invalidate(false);
        }
    }
    // invalidate the activities parent
    parent.getNodeEntry().invalidate(false);
}
Also used : HierarchyEntry(org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry)

Aggregations

HierarchyEntry (org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntry)11 RepositoryException (javax.jcr.RepositoryException)3 ItemNotFoundException (javax.jcr.ItemNotFoundException)2 PathNotFoundException (javax.jcr.PathNotFoundException)2 Operation (org.apache.jackrabbit.jcr2spi.operation.Operation)2 ItemInfo (org.apache.jackrabbit.spi.ItemInfo)2 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 LinkedHashSet (java.util.LinkedHashSet)1 NoSuchElementException (java.util.NoSuchElementException)1 InvalidItemStateException (javax.jcr.InvalidItemStateException)1 ConstraintViolationException (javax.jcr.nodetype.ConstraintViolationException)1 IteratorChain (org.apache.commons.collections.iterators.IteratorChain)1 NodeEntry (org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry)1 SetMixin (org.apache.jackrabbit.jcr2spi.operation.SetMixin)1 SetPrimaryType (org.apache.jackrabbit.jcr2spi.operation.SetPrimaryType)1 NodeState (org.apache.jackrabbit.jcr2spi.state.NodeState)1 NodeInfo (org.apache.jackrabbit.spi.NodeInfo)1 Path (org.apache.jackrabbit.spi.Path)1 PropertyInfo (org.apache.jackrabbit.spi.PropertyInfo)1