com.ibm.portal.resolver.webdav.tree
Interface WebdavLockableTreeModelController<T,M extends Modifiable>
- All Superinterfaces:
- Committable, Disposable, WebdavLockableTreeModel<T>, WebdavTreeModel<T>, WebdavTreeModelController<T,M>
public interface WebdavLockableTreeModelController<T,M extends Modifiable>
- extends WebdavTreeModelController<T,M>, WebdavLockableTreeModel<T>
Implemented by tree models that enable locking and unlocking of their
resources.
- Since:
- 6.1.5
- Note:
This interface is designed to be implemented by clients. |
Method Summary |
java.net.URI |
lock(T item,
WebdavLockInfo lock)
Request to lock a particular resource. |
boolean |
unlock(java.net.URI lockToken,
T item)
Request to unlock a particular resource. |
lock
java.net.URI lock(T item,
WebdavLockInfo lock)
throws java.io.IOException
- Request to lock a particular resource. Implementations may use the
WebdavXMLReaderFactory#createLockToken()
method to construct
their unique lock tokens.
- Parameters:
item
- item to be locked, not null
lock
- information about the requested lock, not null
.
If the WebdavLockInfo.getLockType()
method returns
null
this request is a lock-refresh request and
the method should update the lock information but should not
create a new lock token.
- Returns:
- the new lock token or
null
if the requested lock
already existed and the lock operation only resulted in a lock
refresh
- Throws:
java.io.IOException
unlock
boolean unlock(java.net.URI lockToken,
T item)
throws java.io.IOException
Request to unlock a particular resource. Implementations may return
false
to indicate that the unlock operation has failed,
but it is recommended to rather throw an exception that explains why the
operation failed. This exception should subclass IOException
and
implement the LocalizedStatus
interface.
Implementations must be prepared to receive unlock requests for lock
tokens that they did not issue. In this case the operation should fail.
- Parameters:
lockToken
- token to unlock, not null
item
- item to be locked, not null
- Returns:
true
if the operation succeeded, else
false
Throws:
java.io.IOException