Date: 2004-11-22T08:12:25 Editor: OliverZeigermann <[EMAIL PROTECTED]> Wiki: Jakarta-Slide Wiki Page: WebDavConstructionKit URL: http://wiki.apache.org/jakarta-slide/WebDavConstructionKit
no comment Change Log: ------------------------------------------------------------------------------ @@ -173,3 +173,25 @@ }}} The "callback-store" parameter value must point to your WebdavFileStore implementation (remember your class must implement the BasicWebdavStore interface - as shown above). Here it points to the given WebdavFileStore example. + +==== Correct way to interoperate with Slide locks ==== + +''Posted by Alessandro Apostoli to the Slide user list'' + +I have a static Map to hold the lockids to be returned +by getLockInfo(). Every call to lockObject() generates +an exclusive lock on my proprietary system and stores +the pair (uri,lockId) in the map for later retrieval, this for +webdav locks only. +Each call to getLockInfo() first checks if there is a lock +in the proprietary system and if not it returns a SimpleLock[0] +If the resource is locked it has to determine if it was locked +via webdav or via proprietary interface so it checks if there's an +entry in the map for that lock. If so it returns it, if there's no entry +in the map and the resource is locked it has to generate a valid +lockId, store it in the map for subsequent calls to getLockInfo() +and return it. My system supports only one lock per resource so +the key in my map is the uri, I also used the uri to generate the +lockId string with a call to DigestUtils.md5Hex(uri). +As one might expect a call to unlockObject() removes the entry +from the map and unlocks the resource. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
