|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.locks.LockHelper
public final class LockHelper
Provides an abstraction as the API (Application Programming Interface)
to the lock services. This API includes only class methods and must be
used accordingly. These methods can be categorized as local and remote
invocations. The local methods are getters of information, typically
from cookies, that are held in the client. The remote methods serve as
wrappers to services that promote server-side functionality to clients.
Supported API: true
Extendable: false
Lockable,
LockService,
Serialized Form| Field Summary | |
|---|---|
static boolean |
LOCKED
An indication, passed to getSearchCondition, to build a search condition to find all locked objects. |
static LockService |
service
Supported API: true |
static boolean |
UNLOCKED
An indication, passed to getSearchCondition, to build a search condition to find all unlocked objects. |
| Method Summary | |
|---|---|
static Lockable |
assignLock(Lockable object,
WTPrincipalReference locker,
String note)
Assigns a lock on the given lockable object by the given principal. |
static Lockable |
assignLock(Lockable object,
WTPrincipalReference locker,
String note,
Timestamp date)
Assigns a lock on the given lockable object to the given principal, note and date. |
static WTCollection |
assignLock(WTCollection lockables,
WTPrincipalReference locker,
String note)
Assigns a lock on the given lockable objects by the given principal. |
static Timestamp |
getDate(Lockable object)
Gets the time when the object was locked. |
static WTPrincipal |
getLocker(Lockable object)
Gets the principal who placed the lock. |
static WTPrincipalReference |
getLockerReference(Lockable object)
Gets the principal who placed the lock. |
static String |
getNote(Lockable object)
Gets the reason why the object was locked. |
static SearchCondition |
getSearchCondition(Class target,
boolean state)
Gets a SearchCondition to be appended to a query of all the objects that are either locked or unlocked. |
static SearchCondition |
getSearchCondition(Class target,
WTPrincipal principal,
boolean state)
Gets a SearchCondition to be appended to a query of all the objects that are either locked or unlocked for a given principal. |
static SearchCondition |
getSearchCondition(Class target,
WTPrincipalReference principal,
boolean state)
Gets a SearchCondition to be appended to a query of all the objects that are either locked or unlocked for a given principal. |
static boolean |
isLocked(Lockable object)
Tests if the given object has been locked. |
static Lockable |
releaseLock(Lockable object)
Releases the lock that has been placed on the given lockable object. |
static WTCollection |
releaseLock(WTCollection objectSet)
Releases the lock that has been placed on the given collection of lockable objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean LOCKED
public static final boolean UNLOCKED
public static final LockService service
| Method Detail |
|---|
public static Lockable assignLock(Lockable object,
WTPrincipalReference locker,
String note)
throws WTException,
LockException,
WTPropertyVetoException
object - locker - note -
WTException
LockException
WTPropertyVetoException
public static Lockable releaseLock(Lockable object)
throws WTException,
LockException,
WTPropertyVetoException
object -
WTException
LockException
WTPropertyVetoException
public static boolean isLocked(Lockable object)
throws LockException
object -
LockException
public static Timestamp getDate(Lockable object)
throws LockException
object -
LockException
public static String getNote(Lockable object)
throws LockException
object -
LockException
public static WTPrincipal getLocker(Lockable object)
throws LockException
object -
LockException
public static WTPrincipalReference getLockerReference(Lockable object)
throws LockException
object -
LockException
public static SearchCondition getSearchCondition(Class target,
boolean state)
throws LockException,
QueryException
target - state -
LockException
QueryException
public static SearchCondition getSearchCondition(Class target,
WTPrincipal principal,
boolean state)
throws WTException,
LockException,
QueryException
target - principal - state -
WTException
LockException
QueryException
public static SearchCondition getSearchCondition(Class target,
WTPrincipalReference principal,
boolean state)
throws WTException,
LockException,
QueryException
target - principal - state -
WTException
LockException
QueryException
public static WTCollection releaseLock(WTCollection objectSet)
throws WTException,
LockException,
WTPropertyVetoException
objectSet -
WTException
LockException
WTPropertyVetoExceptionreleaseLock(Lockable object)
public static WTCollection assignLock(WTCollection lockables,
WTPrincipalReference locker,
String note)
throws LockException
lockables - locker - note -
LockException
public static Lockable assignLock(Lockable object,
WTPrincipalReference locker,
String note,
Timestamp date)
throws WTException,
LockException,
WTPropertyVetoException
object - locker - note - date -
WTException
LockException
WTPropertyVetoException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||