02-19-2010 01:20 AM
02-24-2010 07:30 PM
/**
* Move the lock from the src node to a new person. ie this is used to move the lock
* for a node to the owner of a different sandbox.
*
* @param avmLockingService
* @param src - This will be used to determine both the source and destination path when moving lock.
* @param lockOwner - Current lock owner
* @param newLockOwner - User you want to give the lock to.
*/
@SuppressWarnings("unchecked")
static public void reassignLocks(AVMLockingService avmLockingService,
NodeRef src, String lockOwner, String newLockOwner){
logger.debug("Entered method ForewardWizardHelper.reassignLocks");
logger.debug("Current Lock Owner " + lockOwner);
logger.debug("New Lock Owner " + newLockOwner);
String webProject = WCMUtil.getWebProjectStoreIdFromPath(AVMNodeConverter.ToAVMVersionPath(src).getSecond());
logger.debug("Web Project Name is " + webProject);
String srcPath = WCMUtil.splitPath(AVMNodeConverter.ToAVMVersionPath(src).getSecond())[1];
logger.debug("Source Path is " + srcPath);
String newStore = webProject + "–" + newLockOwner;
logger.debug("New Store " + newStore);
List<String> removelist = new ArrayList<String>();
List<String> addlist = new ArrayList<String>();
removelist.add(lockOwner);
addlist.add(newLockOwner);
avmLockingService.modifyLock(webProject, srcPath, srcPath, newStore, removelist, addlist);
logger.debug("Moved Lock from " + lockOwner + " to " + newLockOwner);
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.