/**
   * Returns available subject attribute names.
   *
   * @return a set of available subject attribute names or null if not found
   */
  public Set<String> getAvailableSubjectAttributeNames() throws EntitlementException {

    try {
      ServiceConfig sc = idRepoServiceConfigManager.getOrganizationConfig(realm, null);
      if (sc == null) {
        return null;
      }
      Set subConfigNames = sc.getSubConfigNames();
      if ((subConfigNames == null) || (subConfigNames.isEmpty())) {
        return null;
      }

      CaseInsensitiveHashSet result = null;

      for (Iterator iter = subConfigNames.iterator(); iter.hasNext(); ) {
        String idRepoName = (String) iter.next();
        ServiceConfig reposc = sc.getSubConfig(idRepoName);
        Map attrMap = reposc.getAttributesForRead();
        Set userAttrs = (Set) attrMap.get(LDAPv3Config_USER_ATTR);
        if ((userAttrs != null) && (!userAttrs.isEmpty())) {
          if (result == null) {
            result = new CaseInsensitiveHashSet();
          }
          result.addAll(userAttrs);
        }
      }

      return result;
    } catch (SMSException e) {
      throw new EntitlementException(602, e);
    } catch (SSOException e) {
      throw new EntitlementException(602, e);
    }
  }