public class LockingService extends Object
LockingJob
which refreshes the locking automatically.Modifier and Type | Field and Description |
---|---|
static long |
LOCKING_DELAY |
Modifier and Type | Method and Description |
---|---|
static LockingService |
getInstance() |
boolean |
lockObject(TextGridObject object,
boolean message)
Tries to lock the given TextGridObject for exclusive access
by calling the tg-crud locking mechanism.
|
boolean |
objectIsLocked(TextGridObject object)
Exists a locking job for the given TextGrid object.
|
boolean |
removeJobFromRegistry(TextGridObject object)
Removes a possible locking job from the registry
|
boolean |
unlockObject(TextGridObject object)
Removes a possible locking job from the registry and unlocks the
given TextGridObject by calling the tg-crud unlock funkction.
|
public static final long LOCKING_DELAY
public static LockingService getInstance()
public boolean lockObject(TextGridObject object, boolean message)
object
- TextGridObjekt to lockmessage
- true: a message is shown, if the object
can't be lockedpublic boolean unlockObject(TextGridObject object)
object
- TextGridObject to unlockpublic boolean removeJobFromRegistry(TextGridObject object)
object
- TextGridObject the job should be initiated forpublic boolean objectIsLocked(TextGridObject object)
object
- a TextGrid object