cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Kulemann <r...@apache.org>
Subject Re: [PROP] Repository interface
Date Mon, 05 Apr 2004 11:53:26 GMT
On Mon, 2004-04-05 at 13:38, Guido Casper wrote:
> 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?

Because I can decide if I implement both or only one method. The reason
for the split is, I can use the NotSupportedException more accurate.

> 
> 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).

Ok, I didn't mean the Repsoitory interface, was a litlle bit confusing
maybe, but the RepositoryVersioningHelper. And if a repository does not
support versioning it has no helper at all.

> 
> > 
> > <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).

I will do that. Thanks.
-- 
Regards,

    Rolf Kulemann


Mime
View raw message