Am Mi, den 14.04.2004 schrieb Guido Casper um 9:08:
> Stephan Michels wrote:
> > The Repository IFs seems be more helper classes than components. And I
> > think we should using the Source objects instead to reflect all aspects
> > like locking, property handling etc.
> 
> Care to elaborate why do you think so?

Okay, I try to. For example methods like 
  boolean saveContent(String uri, String content)
shouldn't belong into the interface of a repository. They can easly move
into SourceUtil.
Another point is that you have to specify your repository base path into
cocoon.xconf for the WebDAV. And when you change this, which intention
has the "uri"? Doesn't have you all this with the resolver?

If you use flowscript you have to lookup the repository manager IF:
var repositorymanager =   

cocoon.getComponent('org.apache.cocoon.components.repository.RepositoryManager');

And not until you login you can lookup the repository

userid     = cocoon.request.getParameter("userid");
repository = repositorymanager.getRepository("webdav", new    
  CredentialsToken(new Principal(userid, "guest", null), password));
versioninghelper = repository.getVersioningHelper();

And you have a different behaviour if you use the SourceResolver and the
Repository IF together.

var source = resolver.resolveURI("webdav://localhost:8888/webdav"+path);
repository.save(path, "bla");

I don't want to say that's all crap. I only want to express my concerns,
so, please don't get me wrong.

> I found the partition of work - reading operations via Sources (which 
> BTW is their original intention) and modifying operation via Repository 
> - quite useful.

I doesn't think that we should delegate similar aspects into different
code parts.

> However I use flowscript (which I suspect you don't like :-) for that.

No, I like flowscript, but prefer Java. But nevertheless I currently
write a flowscript application, and I found that it is very cumbersome
to access the different aspects of an WebDAV repository.

Stephan.

Reply via email to