Class UserDirectoryServiceProviderManager

java.lang.Object
com.foreach.across.modules.user.services.UserDirectoryServiceProviderManager

@Service public class UserDirectoryServiceProviderManager extends Object
Tracks different UserDirectoryServiceProvider beans and will return the specific provider that matches a UserDirectory.
Since:
2.0.0
Author:
Arne Vandamme
  • Constructor Details

  • Method Details

    • getServiceProvider

      public UserDirectoryServiceProvider getServiceProvider(@NonNull @NonNull UserDirectory userDirectory)
      Alternative for getServiceProvider(Class) with a non-null instance. This method can return null if no provider is available, but this usually constitutes a configuration problem.
      Parameters:
      userDirectory - instance
      Returns:
      provider or null if none available
    • getServiceProvider

      public UserDirectoryServiceProvider getServiceProvider(Class<? extends UserDirectory> userDirectoryClass)
      Get a UserDirectoryServiceProvider for the given user directory type. This method can return null if no provider is available, but this usually constitutes a configuration problem.
      Parameters:
      userDirectoryClass - type of the user directory
      Returns:
      provider or null if none available