* This is the public method
* @param sessionData
* @throws Exception
*/
public void execute (CGroupsManagerSessionData sessionData) throws Exception{
ChannelStaticData staticData = sessionData.staticData;
ChannelRuntimeData runtimeData= sessionData.runtimeData;
Document model = getXmlDoc(sessionData);
Utility.logMessage("DEBUG", "EditGroup::execute(): Start");
String parentElemId = getCommandArg(runtimeData);
// if not IPerson group, then set view root to root for requested type
String userID = getUserID(sessionData);
//String userName = GroupsManagerXML.getEntityName(ENTITY_CLASSNAME, userID);
String userKey = sessionData.user.getEntityIdentifier().getKey();
String lockKey = userID + "::" + userKey;
Utility.logMessage("DEBUG", "EditGroup::execute(): lockKey = " + lockKey);
Element parentElem = GroupsManagerXML.getElementById(model, parentElemId);
String parentKey = parentElem.getAttribute("key");
ILockableEntityGroup lockedGroup = GroupService.findLockableGroup(parentKey, lockKey);
// if lockedGroup is null, an exception has probably already been thrown
if (lockedGroup != null){
GroupsManagerXML.refreshAllNodesRecursivelyIfRequired(sessionData.getUnrestrictedData(), parentElem);
// store in sessionData
sessionData.lockedGroup=lockedGroup;
sessionData.mode = EDIT_MODE;
staticData.setParameter("groupParentId", parentElemId);
}
Utility.logMessage("DEBUG", "EditGroup::execute(): Uid of parent element = " +
parentElemId);
}