Rolf Kulemann wrote:
[Related to http://issues.apache.org/bugzilla/show_bug.cgi?id=28189]

<quote src="Guido Capser">
As for WebDAVRepsoitoryVersioningHelper.setVersioned(): I don't think it
is a good idea to throw an UnsupportedOperationException only under certain conditions.
</quote>


Agreed.

Maybe it makes sense to split setVersioned(String, boolean) into two
methods

1.) setVersioned(String)
2.) unsetVersioned(String)

in order to be more flexible in the implementation decisions?

Why should that be more flexible?


TBH I'm not so sure wether these should be part of the Repository interface at all as it looks like being geared towards WebDAV only (but I don't know right now).


<quote src="Guido Capser">
A setVersioned(uri, false) might be implemented by deleting and recreating the resource (making copies for safety and checking for auto-versioning).
</quote>


Ehem, how can I check for auto-versioning?

It's a property of the resource. Wether this property is already set upon resource creation usually depends on some server setting.


I just changed the code a little bit. However it's now a little hacky and needs completion as after the copy you should check wether the destination is version controlled and if that's the case undo the move (to keep the old version history) and return false.

I don't know the details of how to check wether a resource is under version control right now (would have to check the DeltaV spec).

Guido

--
Guido Casper
-------------------------------------------------
S&N AG, Competence Center Open Source
                    Tel.: +49-5251-1581-87
Klingenderstr. 5    mailto:[EMAIL PROTECTED]
D-33100 Paderborn   http://www.s-und-n.de
-------------------------------------------------

Reply via email to