void rollback(ItemData item) throws InvalidItemStateException, RepositoryException
{
// remove from changes log (Session pending changes)
PlainChangesLog slog = changesLog.pushLog(item.getQPath());
SessionChangesLog changes = new SessionChangesLog(slog.getAllStates(), session);
StringBuilder exceptions = new StringBuilder();
for (Iterator<ItemImpl> removedIter = invalidated.iterator(); removedIter.hasNext();)
{
ItemImpl removed = removedIter.next();
QPath removedPath = removed.getLocation().getInternalPath();
ItemState rstate = changes.getItemState(removedPath);
if (rstate == null)
{
exceptions.append("Can't find removed item ").append(removed.getLocation().getAsString(false))
.append(" in changes for rollback.\n");
continue;
}
if (rstate.isRenamed())
{
// find DELETED
rstate = changes.findItemState(rstate.getData().getIdentifier(), false, new int[]{ItemState.DELETED});
if (rstate == null)
{
exceptions.append("Can't find removed item (of move operation) ")
.append(removed.getLocation().getAsString(false)).append(" in changes for rollback.\n");
continue;