Filter updatedFilter = filterFactory.id(updatedIds);
Filter deletedFilter = filterFactory.id(deletedIds);
// notify pre-update and pre-delete
listener.dataStoreChange(new TransactionEvent(TransactionEventType.PRE_UPDATE, layerName,
vstore.getFeatures(updatedFilter), rollback));
listener.dataStoreChange(new TransactionEvent(TransactionEventType.PRE_DELETE, layerName,
vstore.getFeatures(deletedFilter), rollback));
// now do the actual rollback
try {
vstore.rollback(version, (Filter) rollback.getFilter(), users);
} catch (Exception e) {
throw new WFSTransactionException("Could not perform the rollback", e, rollback
.getHandle());
}
// notify post update and post insert
listener.dataStoreChange(new TransactionEvent(TransactionEventType.POST_INSERT, layerName,
vstore.getFeatures(insertedFilter)));
listener.dataStoreChange(new TransactionEvent(TransactionEventType.POST_UPDATE, layerName,
vstore.getFeatures(updatedFilter)));
// update summary information
response.getTransactionSummary().setTotalInserted(BigInteger.valueOf(inserted));
response.getTransactionSummary().setTotalUpdated(BigInteger.valueOf(updated));