ActiveLock contains information about locks on this resourece. The
information can be used to provide details when obtaining locks, or for
holding results from lock queries. It combines the activelock DAV element
with the principal, and the lock expiration date.
author: Jim Amsden <jamsden@us.ibm.com>
setLockType(String lockType) Set the type of the lock.
Parameters: lockType - write (other lock types may be supported in the future) exception: com.ibm.webdav.ClientException - thrown if the lockType is incorrect.
A resource may have many concurrent shared locks which indicate an
intention to change the resource in some way. It is the responsibilty of
the shared lock owners to coordinate their updates appropriately through
other means.
Convert an activelock Element into a ActiveLock instance for convenient
access to the lock information. This method uses two IBM extensions to
the WebDAV activelock element, one for the principal, and onother for the
lock expiration time.
Parameters: an - activelock Element containing information about the lock exception: com.ibm.webdav.WebDAVException -
Translate this ActiveLock instance into an activelock XML element. The
activelock element will include two IBM extensions, one for the principal
owning the lock (the authorization id), and another containing the
expiration date for the lock.
the DOM representation of an activelock XML element
Get the lock token. A lock token represents the lock, and is used to
unlock the resource or for any access that might change the resource
state. There may be many (shared) locks on a resource, each with its own
lock token. Each lock will have its own ActiveLock instance describing
the lock and providing access to the lock token. See the lockdiscovery
DAV property.
the lock token identifying a lock on this resource.
Get the owner of the lock. The method provides information about the
principal taking out the lock, but not necessarily the principal's
authorization ID.
any information that might identify the principal taking out thelock.
Get the user authorization id of the owner of the lock. This is an IBM
EXTENSION to the WebDAV activelock.
the principal owning this lock as given in the Authorizationcontext on lock
Set the type of the lock.
Parameters: lockType - write (other lock types may be supported in the future) exception: com.ibm.webdav.ClientException - thrown if the lockType is incorrect. Currently, only writelocks are supported.
Set the owner of the lock. The method sets the information about the
principal taking out the lock. This is not necessarily the authorization
id of the principal owning the lock, and therefore cannot be relied upon
for authentication.
Parameters: owner - any information that might identify the principal taking outthe lock.