class AmbariLdapFacade implements LdapFacade {

  @Override
  public AmbariLdapConfiguration detectAttributes(AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException {
    LOGGER.info("Detecting LDAP configuration attributes ...");

    try {
      LOGGER.info("Detecting user attributes ....");
      // decorate the configuration with detected user attributes
      ambariLdapConfiguration = ldapAttributeDetectionService.detectLdapUserAttributes(ambariLdapConfiguration);

      LOGGER.info("Detecting group attributes ....");
      // decorate the configuration with detected group attributes
      ambariLdapConfiguration = ldapAttributeDetectionService.detectLdapGroupAttributes(ambariLdapConfiguration);

      LOGGER.info("Attribute detection finished.");
      return ambariLdapConfiguration;

    } catch (Exception e) {

      LOGGER.error("Error during LDAP attribute detection", e);
      throw new AmbariLdapException(e);

    }
  }

  @Inject public  AmbariLdapFacade();

}