}
}
// process all remaining states that were not covered by the
// operation persistence.
for (ItemState state : affectedStates) {
HierarchyEntry he = state.getHierarchyEntry();
switch (state.getStatus()) {
case Status.EXISTING_MODIFIED:
state.setStatus(Status.EXISTING);
if (state.isNode()) {
if (changedPrimaryTypes.contains(state)) {
// primary type changed for a node -> force reloading upon next
// access in order to be aware of modified definition etc...
he.invalidate(true);
} else if (changedMixins.contains(state)) {
// mixin changed for a node -> force reloading upon next
// access in order to be aware of modified uniqueID.
he.invalidate(false);
}
}
break;
case Status.EXISTING_REMOVED:
he.remove();
break;
case Status.NEW:
// illegal. should not get here.
log.error("ChangeLog still contains NEW state: " + state.getName());
state.setStatus(Status.EXISTING);
break;
case Status.MODIFIED:
case Status._UNDEFINED_:
case Status.STALE_DESTROYED:
case Status.STALE_MODIFIED:
// illegal.
log.error("ChangeLog contains state (" + state.getName() + ") with illegal status " + Status.getName(state.getStatus()));
break;
case Status.EXISTING:
if (state.isNode() && changedMixins.contains(state)) {
// mixin changed for a node -> force reloading upon next
// access in order to be aware of modified uniqueID.
he.invalidate(false);
}
// otherwise: ignore. operations already have been completed
break;
case Status.INVALIDATED:
case Status.REMOVED:
he.invalidate(false);
break;
}
}
}