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
