SessionItemStateManager stateMgr = context.getItemStateManager();
// Optimisation for the root node
if (state.getParentId() == null) {
stateMgr.disposeAllTransientItemStates();
return this;
}
// list of transient items that should be discarded
List<ItemState> transientStates = new ArrayList<ItemState>();