/**
   * @param domainId
   * @return Group[]
   * @throws Exception
   */
  public Group[] getAllGroups(String domainId) throws Exception {
    Group[] groups = null;
    try {
      // Set the OrganizationSchema (if not already done)
      getOrganizationSchema();
      // Get a DomainDriver instance
      DomainDriver domainDriver = this.getDomainDriver(idAsInt(domainId));

      // Get Group from specific domain
      groups = domainDriver.getAllGroups();
    } catch (AdminException e) {
      throw new AdminException(
          "DomainDriverManager.getAllGroups",
          SilverpeasException.ERROR,
          "admin.EX_ERR_GET_ALL_GROUPS",
          "domain Id: '" + domainId + "'",
          e);
    } finally {
      releaseOrganizationSchema();
    }
    return groups;
  }