You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by jeremi joslin <je...@gmail.com> on 2006/03/20 13:11:27 UTC

dav in SimpleWebdavServlet and JCRWebdavServerServlet

Hi,
i've started to look at how to add dav functions to the SimpleWebdavServlet.

As i can see, i have to create a class to create a controlled resource
like this :

public class VersionControlledResourceImpl extends DavResourceImpl
implements VersionControlledResource, ItemResourceConstants,
TransactionResource
{
...
}

I think, most of the code for the resource in the SimpleWebdavServlet
will be the same as for the resource for the JCRWebdavServerServlet.
Do you think we can extract the code and share it between this two
objects? or do you have another idea?

Jérémi
--
Blog: http://www.jeremi.info
LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724
Project Manager XWiki: http://www.xwiki.org
skype: jeremi23 -- msn et gtalk : jeremi23@gmail.com

Re: dav in SimpleWebdavServlet and JCRWebdavServerServlet

Posted by Angela Schreiber <an...@day.com>.
hi jérémi

jeremi joslin wrote:
> As i can see, i have to create a class to create a controlled resource
> like this :
> 
> public class VersionControlledResourceImpl extends DavResourceImpl
> implements VersionControlledResource, ItemResourceConstants,
> TransactionResource
> {
> ...
> }

actually you only need to implement the VersionControlledResource
interface for the vc-resource. all the rest (ItemResourceConstants,
TransactionResource and so on) is used for the remoting and has
nothing to do with deltaV.

> I think, most of the code for the resource in the SimpleWebdavServlet
> will be the same as for the resource for the JCRWebdavServerServlet.
> Do you think we can extract the code and share it between this two
> objects? or do you have another idea?

since the resource implementations for the jcr-server are intended
to be used for the remoting of jsr170, they provide a lot of code
that is neither needed nor specially useful for deltaV-support.

some stuff like checkin/checkout, add-version-control will
basically be the same, but the aim of the implementation is
different and so is the focus.
it is comparable to a DavResource.addMember call: in the end both
implementations will do some sort of addNode or addProperty or
importXml due to the fact, that both implementations are built
on top of a jsr170 compliant repository and not because the are
the same.

saying this, i would suggest not to use common base classes or
share code but rather keep the two implementations separately,
at least in a first step.

kind regards
angela