Hi Nick,
looks good, just a few (silly) questions:
* Is it necessary to add a new Lock class? isn't it possible to reuse
the existing org.apache.webdav.lib.Lock?
* I guess that the proposed new executePut with lock is meant as a
convenience? is it correct that the same can be done by letting the
application code call lockDocument first? If that is the case I would
propose not adding them, you would need a 'locked' variant of all write
methods (proppatch, put, copy etc.) leading to many more methods. I
would prefer to keep the interface as clean and orthogonal as possible.
For the rest: patches for more complete webdav support are more than
welcome :-)
I'm looking forward to reviewing your patch, keep up the good work!
Wander
Nick Stolwijk wrote:
Hi, I was looking for a way to get locking on documents in the
repository and found that these methods weren't available on the
interface yet. I have found the WebdavHelper which has the logic for
this code, so I can implement the methods, but I first need to know
which methods.
I was thinking along the lines of
public String lockDocument(Document doc, Lock lock) throws ClientException;
public void unlockDocument(Document doc, String lockToken) throws
ClientException;
And a new value class Lock which contains the properties Scope, Depth
and Owner, just like org.apache.webdav.lib.Lock.
There also must be additional methods for the other webdav methods, to
provide the lockToken.
ie.
public int executePut(DocumentPath targetPath, InputStream putObject)
throws ClientException;
public int executePut(DocumentPath targetPath, InputStream putObject,
String lockToken) throws ClientException;
Any input appreciated, so I can provide a patch that implements this.
With regards,
Nick Stolwijk
~Java Developer~
Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
********************************************
Hippocms-dev: Hippo CMS development public mailinglist
Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html