private GluuLdapConfiguration fixLdapConfiguration(GluuLdapConfiguration ldapConfig) {
    ldapConfig.updateStringsLists();
    if (ldapConfig.isUseAnonymousBind()) {
      ldapConfig.setBindDN(null);
    }

    return ldapConfig;
  }
  private boolean validateList(
      GluuLdapConfiguration ldapConfig, String configType, boolean validateBaseDNs) {
    boolean result = true;
    if (ldapConfig.getServers().size() == 0) {
      log.error(
          "{0} LDAP configuration '{1}' should contains at least one server",
          configType, ldapConfig.getConfigId());
      facesMessages.add(
          Severity.ERROR,
          "{0} LDAP configuration '{1}' should contains at least one server",
          configType,
          ldapConfig.getConfigId());
      result = false;
    }

    if (validateBaseDNs && (ldapConfig.getBaseDNs().size() == 0)) {
      log.error(
          "{0} LDAP configuration '{1}' should contains at least one Base DN",
          configType, ldapConfig.getConfigId());
      facesMessages.add(
          Severity.ERROR,
          "{0} LDAP configuration '{1}' should contains at least one Base DN",
          configType,
          ldapConfig.getConfigId());
      result = false;
    }

    return result;
  }
 @Override
 public void addLdapConfig(List<GluuLdapConfiguration> ldapConfigList) {
   GluuLdapConfiguration ldapConfiguration = new GluuLdapConfiguration();
   ldapConfiguration.setBindPassword("");
   ldapConfigList.add(ldapConfiguration);
 }