Class UserDirectoryServiceProviderManager
java.lang.Object
com.foreach.across.modules.user.services.UserDirectoryServiceProviderManager
Tracks different
UserDirectoryServiceProvider
beans and will return the specific provider that
matches a UserDirectory
.- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
ConstructorDescriptionUserDirectoryServiceProviderManager
(Collection<UserDirectoryServiceProvider> userDirectoryServiceProviders) -
Method Summary
Modifier and TypeMethodDescriptiongetServiceProvider
(@NonNull UserDirectory userDirectory) Alternative forgetServiceProvider(Class)
with a non-null instance.getServiceProvider
(Class<? extends UserDirectory> userDirectoryClass) Get aUserDirectoryServiceProvider
for the given user directory type.
-
Constructor Details
-
UserDirectoryServiceProviderManager
@Autowired public UserDirectoryServiceProviderManager(Collection<UserDirectoryServiceProvider> userDirectoryServiceProviders)
-
-
Method Details
-
getServiceProvider
public UserDirectoryServiceProvider getServiceProvider(@NonNull @NonNull UserDirectory userDirectory) Alternative forgetServiceProvider(Class)
with a non-null instance. This method can returnnull
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 aUserDirectoryServiceProvider
for the given user directory type. This method can returnnull
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
-