Utility.logMessage("DEBUG", "GroupWrapper::expandElement(): Group Member: " + gm);
Utility.logMessage("DEBUG", "GroupWrapper::expandElement(): Element: " + anElem);
//We only want to expand the element if the attribute is set to "true"
if (!Utility.areEqual(anElem.getAttribute("expanded"), "true")) {return anElem;}
java.util.Iterator gmItr = null;
IGroupMember aChildGm = null;
Element tempElem = null;
try {
Utility.logMessage("DEBUG", "GroupWrapper::expandElement(): HERE COME THE KIDS");
gmItr = gm.getMembers();
// add new elements for new group members
int gmCount = 0;
while (gmItr.hasNext()) {
aChildGm = (IGroupMember)gmItr.next();
// if the limit has been exceeded, and this is not a group, skip it
if (!limitRetrievals || aChildGm.isGroup() || gmCount < retrievalLimit) {
String childKey = aChildGm.getKey();
Utility.logMessage("DEBUG", "GroupWrapper::expandElement(): " + aChildGm);
boolean memberElementFound = false;
String tagname = (aChildGm.isGroup() ? GROUP_TAGNAME : ENTITY_TAGNAME);
memberElementFound = GroupsManagerXML.getNodesByTagNameAndKey(anElem, tagname,
childKey).hasNext();
if (!memberElementFound) {
tempElem = GroupsManagerXML.getGroupMemberXml(aChildGm,false, null, sessionData);
Utility.logMessage("DEBUG", "GroupWrapper::expandElement(): APPENDING "