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 thePrincipalProviderRegistry
interface.
-
-
Constructor Summary
Constructors Constructor Description ProviderRegistryImpl(PrincipalProvider defaultPrincipalProvider)
Create an instance ofProviderRegistryImpl
with the given default principal provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrincipalProvider
getDefault()
PrincipalProvider
getProvider(String className)
PrincipalProvider[]
getProviders()
Returns all registered providers.PrincipalProvider
registerProvider(Properties config)
Registers a new provider by means of a configuration.
-
-
-
Constructor Detail
-
ProviderRegistryImpl
public ProviderRegistryImpl(PrincipalProvider defaultPrincipalProvider)
Create an instance ofProviderRegistryImpl
with 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:PrincipalProviderRegistry
Registers a new provider by means of a configuration. The registry expects the properties to contain aLoginModuleConfig.PARAM_PRINCIPAL_PROVIDER_CLASS
to be able to create a instance of PrincipalProvider.The Properties will be passed to the instantiated Provider via
PrincipalProvider.init(Properties)
- Specified by:
registerProvider
in interfacePrincipalProviderRegistry
- Parameters:
config
- Properties for the Provider- Returns:
- the newly added Provider or
null
if 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:
getDefault
in interfacePrincipalProviderRegistry
- Returns:
- the default principal provider
- See Also:
PrincipalProviderRegistry.getDefault()
-
getProvider
public PrincipalProvider getProvider(String className)
- Specified by:
getProvider
in interfacePrincipalProviderRegistry
- Parameters:
className
- Name of the principal provider class.- Returns:
- PrincipalProvider or
null
if no provider with the given class name was registered. - See Also:
PrincipalProviderRegistry.getProviders()
-
getProviders
public PrincipalProvider[] getProviders()
Description copied from interface:PrincipalProviderRegistry
Returns all registered providers.- Specified by:
getProviders
in interfacePrincipalProviderRegistry
- Returns:
- all registered providers.
- See Also:
PrincipalProviderRegistry.getProviders()
-
-