Class PropertiesLDAPService

java.lang.Object
overit.geocall.config.company.PropertiesLDAPService

public class PropertiesLDAPService extends Object
class containing the configurations related to the configured ldap services.
note: all the configuration refers to the company whose the identity belongs to.
  • Method Details

    • services

      public static List<String> services(Company company)
      Get the list of the names for the configured ldap services.
      Parameters:
      company - the company from which extract the configuration
      Returns:
      the names of the configured ldap service. If there's no ldap service configured, this method will return an empty list.
    • urls

      public static List<String> urls(Company company, String service)
      Retrieve the urls associated to the ldap server.
      Parameters:
      company - the company from which extract the configuration
      service - the name of the selected ldap service
      Returns:
      the service urls or empty list if it is not configured
    • factory

      public static String factory(Company company, String service)
      Retrieve the reference to the factory class to be used to instantiate the connections to the LDAP server. Usually, the com.sun.jndi.ldap.LdapCtxFactory class is used.
      Parameters:
      company - the company from which extract the configuration
      service - the name of the selected ldap service
      Returns:
      the ldap factory class reference or null if it is not configured
    • principal

      public static String principal(Company company, String service)
      Retrieve the username used to authenticate in the LDAP directory
      Parameters:
      company - the company from which extract the configuration
      service - the name of the selected ldap service
      Returns:
      the principal username or null if it is not configured
    • credentials

      public static String credentials(Company company, String service)
      Retrieve the password used to authenticate in the LDAP directory
      Parameters:
      company - the company from which extract the configuration
      service - the name of the selected ldap service
      Returns:
      the principal password or null if it is not configured
    • domain

      public static String domain(Company company, String service)
      Retrieve the reference domain in the LDAP directory
      Parameters:
      company - the company from which extract the configuration
      service - the name of the selected ldap service
      Returns:
      the domain of the ldap directory or null if it is not configured
    • parameters

      public static String parameters(Company company, String service)
      Retrieve the LDAP search parameters. The string must comply to the following format: param1=value1,param2=value2.
      Parameters:
      company - the company from which extract the configuration
      service - the name of the selected ldap service
      Returns:
      the lda additional parameters or null if it is not configured