public String[] listSubGroups(String groupname) throws RemoteException, VOMSException {

    log.info("listSubGroups(" + StringUtils.join(new Object[] {groupname}, ',') + ");");

    try {

      List childrenGroups;

      if (groupname == null) {

        VOMSContext ctxt = VOMSContext.getVoContext();
        childrenGroups = (List) ListChildrenGroupsOperation.instance(ctxt.getGroup()).execute();
      } else childrenGroups = (List) ListChildrenGroupsOperation.instance(groupname).execute();

      HibernateFactory.commitTransaction();
      return ServiceUtils.groupsToStringArray(childrenGroups);

    } catch (RuntimeException e) {

      ServiceExceptionHelper.handleServiceException(log, e);
      throw e;
    }
  }
  protected final void setupPermissions() {

    addRequiredPermission(
        VOMSContext.getVoContext(),
        VOMSPermission.getEmptyPermissions().setRequestsReadPermission());
  }