As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
/** * 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); }