ccc.domain
Interface Lockable

All Known Implementing Classes:
AliasEntity, FileEntity, FolderEntity, HistoricalResource, PageEntity, ResourceEntity, Search, TemplateEntity, WorkingCopySupport

public interface Lockable

API for objects that can be locked by a user.

Author:
Civic Computing Ltd.

Method Summary
 void confirmLock(UserEntity user)
          Confirm this resource is locked by the specified user.
 void lock(UserEntity u)
          Lock a resource.
 void unlock(UserEntity user)
          Unlock the resource.
 

Method Detail

lock

void lock(UserEntity u)
Lock a resource.

Parameters:
u - The user who is locking the resource.

unlock

void unlock(UserEntity user)
Unlock the resource. Only the user who locked the resource, or an administrator may call this method.

Parameters:
user - The user releasing the lock.

confirmLock

void confirmLock(UserEntity user)
Confirm this resource is locked by the specified user. If this resource is locked by the specified user this method does nothing; otherwise an exception is thrown.

Parameters:
user - The user who should have the lock.


Copyright © 2010. All Rights Reserved.