Hi all,
I'm having some issues with the semantics of a rollback
in the versioned data store, so I'm going to describe
the problem to see if anybody has some clue.
I was thinking of adding the following operation to the
versioned datastore:
void rollback(String version, String typeName, Filter filter, Transaction t);
where:
* version is the revision, or could be branch:revision
once we have the
* typeName is the feature type subject to rollback
* filter matches the features that need to be rolled back
* transaction allows to do multiple rollbacks on different
feature types and carries user and commit message as properties
Now, my problem is the filter... what should the filter match?
The old features, the current ones?
That's not trivial, think about a bbox filter, and a feature
that moved from inside to outside the bbox. Shall I rollback it?
And what about features that were deleted? They have no
current state.
What about the ones that have been created? They have no old state.
So, I'm lending to apply rollback to every feature that matches
the filter in either the new or old state, but I'd like to hear
some feedback about this before going on.
Plus, there's a limitation. What if I wanted to rollback only things
that a silly user did? Unfortunately userid is not part of the
feature type, so it's hard to deal with it. Maybe the method should
be:
void rollback(String version, String typename, String userId, Filter filter, Transaction t).
Opinions?
Cheers
Andrea