Class ProviderRegistryImpl
- java.lang.Object
-
- org.apache.jackrabbit.core.security.principal.ProviderRegistryImpl
-
- All Implemented Interfaces:
PrincipalProviderRegistry
public class ProviderRegistryImpl extends Object implements PrincipalProviderRegistry
This is the default implementation of thePrincipalProviderRegistryinterface.
-
-
Constructor Summary
Constructors Constructor Description ProviderRegistryImpl(PrincipalProvider defaultPrincipalProvider)Create an instance ofProviderRegistryImplwith the given default principal provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrincipalProvidergetDefault()PrincipalProvidergetProvider(String className)PrincipalProvider[]getProviders()Returns all registered providers.PrincipalProviderregisterProvider(Properties config)Registers a new provider by means of a configuration.
-
-
-
Constructor Detail
-
ProviderRegistryImpl
public ProviderRegistryImpl(PrincipalProvider defaultPrincipalProvider)
Create an instance ofProviderRegistryImplwith the given default principal provider. NOTE that the provider must be initialized by the caller.- Parameters:
defaultPrincipalProvider- The default principal provider.
-
-
Method Detail
-
registerProvider
public PrincipalProvider registerProvider(Properties config) throws RepositoryException
Description copied from interface:PrincipalProviderRegistryRegisters a new provider by means of a configuration. The registry expects the properties to contain aLoginModuleConfig.PARAM_PRINCIPAL_PROVIDER_CLASSto be able to create a instance of PrincipalProvider.The Properties will be passed to the instantiated Provider via
PrincipalProvider.init(Properties)- Specified by:
registerProviderin interfacePrincipalProviderRegistry- Parameters:
config- Properties for the Provider- Returns:
- the newly added Provider or
nullif the configuration was incomplete. - Throws:
RepositoryException- if an error occurs while creating the provider instance.- See Also:
PrincipalProviderRegistry.registerProvider(Properties)
-
getDefault
public PrincipalProvider getDefault()
- Specified by:
getDefaultin interfacePrincipalProviderRegistry- Returns:
- the default principal provider
- See Also:
PrincipalProviderRegistry.getDefault()
-
getProvider
public PrincipalProvider getProvider(String className)
- Specified by:
getProviderin interfacePrincipalProviderRegistry- Parameters:
className- Name of the principal provider class.- Returns:
- PrincipalProvider or
nullif no provider with the given class name was registered. - See Also:
PrincipalProviderRegistry.getProviders()
-
getProviders
public PrincipalProvider[] getProviders()
Description copied from interface:PrincipalProviderRegistryReturns all registered providers.- Specified by:
getProvidersin interfacePrincipalProviderRegistry- Returns:
- all registered providers.
- See Also:
PrincipalProviderRegistry.getProviders()
-
-