public class LockServiceImpl extends Object implements LockService, org.picocontainer.Startable
| Constructor and Description |
|---|
LockServiceImpl(org.exoplatform.container.xml.InitParams params,
org.exoplatform.services.cache.CacheService cacheService)
Constructor method
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGroupsOrUsersForLock(String groupsOrUsers)
Allow to add user or group to the locking manager list which allowed to unlock all nodes
|
void |
addLockGroupsOrUsersPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
Add new users or groups into lockGroupsOrUsersPlugin_
|
void |
changeLockToken(javax.jcr.Node oldNode,
javax.jcr.Node newNode)
Change lock token from old node to new node.
|
void |
changeLockToken(String srcPath,
javax.jcr.Node newNode)
Change lock token from source path to new node.
|
String |
createLockKey(javax.jcr.Node node)
Create Lock key from specific node.
|
String |
createLockKey(javax.jcr.Node node,
String userId)
Create Lock key from a specific node and user id.
|
List<String> |
getAllGroupsOrUsersForLock()
Get all the identities which allowed to unlock nodes
|
HashMap<String,Map<String,String>> |
getLockHolding()
Return a HashMap which keeping all locked nodes informations
|
Map<String,String> |
getLockInformation(String userId)
Return a Map which kept lock token of node which locked by user
|
String |
getLockToken(javax.jcr.Node node)
Get Lock token from specifiec node.
|
String |
getLockTokenOfUser(javax.jcr.Node node)
Get lock token of user from a specific node.
|
String |
getOldLockKey(String srcPath,
javax.jcr.Node node)
Get old lock key from source path and a specific node.
|
List<String> |
getPreSettingLockList()
Get all pre-setting lock list
|
void |
putToLockHoding(String userId,
Map<String,String> lockedNodesInfo)
Put all informations of locked node such as locktoken to the Map
|
void |
removeGroupsOrUsersForLock(String groupsOrUsers)
Remove user or group out of the locking manager list
|
void |
removeLocks()
Remove all locked nodes in the system.
|
void |
removeLocksOfUser(String userId)
Remove all locked nodes user
|
void |
start() |
void |
stop() |
public void addLockGroupsOrUsersPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - public List<String> getPreSettingLockList()
getPreSettingLockList in interface LockServicepublic List<String> getAllGroupsOrUsersForLock() throws Exception
getAllGroupsOrUsersForLock in interface LockServiceExceptionpublic void addGroupsOrUsersForLock(String groupsOrUsers) throws Exception
addGroupsOrUsersForLock in interface LockServicegroupsOrUsers - User id or group idExceptionpublic void removeGroupsOrUsersForLock(String groupsOrUsers) throws Exception
removeGroupsOrUsersForLock in interface LockServiceExceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic HashMap<String,Map<String,String>> getLockHolding()
getLockHolding in interface LockServicepublic void putToLockHoding(String userId, Map<String,String> lockedNodesInfo)
putToLockHoding in interface LockServiceuserId - It is a key which will be used to get the locked informationlockedNodesInfo - A Map which kept the locked node informationpublic Map<String,String> getLockInformation(String userId)
getLockInformation in interface LockServicepublic void removeLocksOfUser(String userId)
removeLocksOfUser in interface LockServiceuserId - User Identity which will be used to remove all locked node which belong to he/shepublic void removeLocks()
removeLocks in interface LockServicepublic String getLockTokenOfUser(javax.jcr.Node node) throws Exception
getLockTokenOfUser in interface LockServicenode - a specific nodeExceptionpublic String createLockKey(javax.jcr.Node node) throws Exception
createLockKey in interface LockServicenode - a specific nodeExceptionpublic String createLockKey(javax.jcr.Node node, String userId) throws Exception
createLockKey in interface LockServicenode - a specific nodeuserId - user IDExceptionpublic String getLockToken(javax.jcr.Node node) throws Exception
getLockToken in interface LockServicenode - a specific nodeExceptionpublic void changeLockToken(String srcPath, javax.jcr.Node newNode) throws Exception
changeLockToken in interface LockServicesrcPath - source node pathnewNode - new nodeExceptionpublic void changeLockToken(javax.jcr.Node oldNode,
javax.jcr.Node newNode)
throws Exception
changeLockToken in interface LockServiceoldNode - old nodenewNode - new nodeExceptionpublic String getOldLockKey(String srcPath, javax.jcr.Node node) throws Exception
getOldLockKey in interface LockServicesrcPath - source pathnode - a specific nodeExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.