@Dependent public class LockManagerImpl extends Object implements LockManager
LockManager
using the
VFSLockServiceProxy
for lock management.Constructor and Description |
---|
LockManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
acquireLock()
Attempts to acquire a lock where the consuming code knows a lock needs to
be acquired.
|
void |
acquireLockOnDemand()
Registers DOM handlers to detect changes on
LockTarget.getWidget() and, if required (see
LockDemandDetector ), automatically tries to acquire a lock. |
com.google.gwt.user.client.EventListener |
acquireLockOnDemand(com.google.gwt.dom.client.Element element) |
protected void |
fireChangeTitleEvent() |
protected void |
fireUpdatedLockStatusEvent() |
protected org.uberfire.backend.vfs.impl.LockInfo |
getLockInfo() |
LockTarget |
getLockTarget() |
void |
init(LockTarget lockTarget)
Retrieves the latest lock information for the provided target and fires
events to update the corresponding UI.
|
void |
onFocus()
Notifies this lock manager that the lock target's widget got focus to
initialize widget-specific state i.e. to publish JavaScript methods for
lock management which can be used by non-native editors (i.e editors that
are rendered on the server).
|
void |
releaseLock()
Releases the previously acquired lock.
|
public void init(LockTarget lockTarget)
LockManager
init
in interface LockManager
lockTarget
- the LockTarget
providing information about what to
lock.public void onFocus()
LockManager
LockManager.init(LockTarget)
).onFocus
in interface LockManager
public void acquireLockOnDemand()
LockManager
LockTarget.getWidget()
and, if required (see
LockDemandDetector
), automatically tries to acquire a lock. If
the target is already locked by another user and the lock can't be
acquired, the user will be notified and the lock target's reload runnable
will be executed. Errors in the execution of this method are propagated
to the global RPC/MessageBus error handler. The lock manager must be
initialized before calling this method (see LockManager.init(LockTarget)
).acquireLockOnDemand
in interface LockManager
public com.google.gwt.user.client.EventListener acquireLockOnDemand(com.google.gwt.dom.client.Element element)
public void acquireLock()
LockManager
ChangeTitleWidgetEvent
to be fired. Errors in the execution of
this method are propagated to the global RPC/MessageBus error handler.
The lock manager must be initialized before calling this method (see
LockManager.init(LockTarget)
).acquireLock
in interface LockManager
public void releaseLock()
LockManager
releaseLock
in interface LockManager
public LockTarget getLockTarget()
protected org.uberfire.backend.vfs.impl.LockInfo getLockInfo()
protected void fireChangeTitleEvent()
protected void fireUpdatedLockStatusEvent()
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.