_initializeChildGroupsAndStems(this); Iterator iter = this.getChild_groups().iterator();  GrouperSession root = GrouperSessionFinder.getTransientRootSession(); while (iter.hasNext()) { Group child = (Group) iter.next(); child.setSession(root); try { PrivilegeResolver.getInstance().canVIEW( root, child, s.getSubject() ); child.setSession(this.getSession()); children.add(child);
try { Iterator iter = this.getChildGroupsNpHi().iterator();  GrouperSession root = GrouperSessionFinder.getTransientRootSession(); while (iter.hasNext()) { Group child = (Group) iter.next(); child.setSession(root); try { PrivilegeResolver.getInstance().canVIEW( root, child, s.getSubject() ); child.setSession(this.getSession()); children.add(child); } catch (InsufficientPrivilegeException eIP) { ErrorLog.error(Stem.class, E.STEM_GETCHILDGROUPS + eIP.getMessage()); }
  public Set getChildGroups() {    GrouperSession.validate(this.getSession());    Set children  = new LinkedHashSet();    try {      _initializeChildGroupsAndStems(this);      Iterator iter = this.getChild_groups().iterator();      // Perform check as root      GrouperSession root = GrouperSessionFinder.getTransientRootSession();      while (iter.hasNext()) {        Group child = (Group) iter.next();        child.setSession(root);        try {          PrivilegeResolver.getInstance().canVIEW(            root, child, s.getSubject()          );          child.setSession(this.getSession());          children.add(child);        }        catch (InsufficientPrivilegeException eIP) {          ErrorLog.error(Stem.class, E.STEM_GETCHILDGROUPS + eIP.getMessage());        }      }      root.stop();    }    catch (Exception e) {      // @exception HibernateException      // @exception SessionException      ErrorLog.error(Stem.class, e.getMessage());    }    return children;  } // public Set getChildGroups()