code: public List<CmsGroup> getChildren(CmsDbContext dbc, CmsGroup group, boolean includeSubChildren)
      throws CmsException {
  
          if (!includeSubChildren) {
              return getUserDriver(dbc).readChildGroups(dbc, group.getName());
          }
          Set<CmsGroup> allChildren = new TreeSet<CmsGroup>();
          // iterate all child groups
          Iterator<CmsGroup> it = getUserDriver(dbc).readChildGroups(dbc, group.getName()).iterator();
          while (it.hasNext()) {
              CmsGroup child = it.next();
              // add the group itself
              allChildren.add(child);
              // now get all sub-children for each group
              allChildren.addAll(getChildren(dbc, child, true));
          }
          return new ArrayList<CmsGroup>(allChildren);
      }
docs: Returns all child groups of a group.<p>
  
  @param dbc the current database context
  @param group the group to get the child for
  @param includeSubChildren if set also returns all sub-child groups of the given group
  
  @return a list of all child <code>{@link CmsGroup}</code> objects
  
  @throws CmsException if operation was not successful