@Override
  public OperationResult performOperation(String categoryName, Map<String, String> properties,
                                          boolean mergeExistingProperties, String operation, Map<String, Object> operationParameters) throws SystemException {

    if (!AmbariServerConfigurationCategory.LDAP_CONFIGURATION.getCategoryName().equals(categoryName)) {
      throw new SystemException(String.format("Unexpected category name for Ambari server LDAP properties: %s", categoryName));
    }

    OperationType operationType;
    try {
      operationType = OperationType.translate(operation);
    } catch (IllegalArgumentException e) {
      throw new SystemException(String.format("The requested operation is not supported for this category: %s", categoryName), e);
    }

    Map<String, String> ldapConfigurationProperties = new HashMap<>();

    // If we need to merge with the properties of an existing ldap-configuration property set, attempt
    // to retrieve if. If one does not exist, that is ok.
    if (mergeExistingProperties) {
      Map<String, String> _ldapProperties = getConfigurationProperties(categoryName);
      if (_ldapProperties != null) {
        ldapConfigurationProperties.putAll(_ldapProperties);
      }
    }

    if (properties != null) {
      ldapConfigurationProperties.putAll(properties);
    }

    AmbariLdapConfiguration ambariLdapConfiguration = new AmbariLdapConfiguration(ldapConfigurationProperties);

    boolean success = true;
    String message = null;
    Object resultData = null;

    try {
      switch (operationType) {
        case TEST_CONNECTION:
          LOGGER.debug("Testing connection to the LDAP server ...");
          ldapFacade.checkConnection(ambariLdapConfiguration);
          break;

        case TEST_ATTRIBUTES:
          LOGGER.debug("Testing LDAP attributes ....");
          Set<String> groups = ldapFacade.checkLdapAttributes(operationParameters, ambariLdapConfiguration);
          resultData = Collections.singletonMap("groups", groups);
          break;

        case DETECT_ATTRIBUTES:
          LOGGER.info("Detecting LDAP attributes ...");
          ambariLdapConfiguration = ldapFacade.detectAttributes(ambariLdapConfiguration);
          resultData = Collections.singletonMap("attributes", ambariLdapConfiguration.toMap());
          break;

        default:
          LOGGER.warn("No action provided ...");
          throw new IllegalArgumentException("No request action provided");
      }
    } catch (AmbariLdapException e) {
      success = false;
      message = determineCause(e);
      if (StringUtils.isEmpty(message)) {
        message = "An unexpected error has occurred.";
      }

      LOGGER.warn(String.format("Failed to perform %s: %s", operationType.name(), message), e);
    }

    return new OperationResult(operationType.getOperation(), success, message, resultData);
  }
Gets the set of services for which the user declared  Ambari to enable LDAP integration.
<p>
If Ambari is not managing LDAP integration configuration for services the set of names will be empty.

@return a set of service names
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AmbariServerLDAPConfigurationHandler.java