Package org.ametys.core.authentication
Class CredentialProviderFactory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.authentication.CredentialProviderFactory
- All Implemented Interfaces:
LogEnabled,ExtensionPoint<CredentialProviderModel>,Disposable,Initializable,Component,Contextualizable,Serviceable,ThreadSafe
public class CredentialProviderFactory
extends AbstractLogEnabled
implements ExtensionPoint<CredentialProviderModel>, Initializable, ThreadSafe, Component, Serviceable, Contextualizable, Disposable
This extension point handles a list of
CredentialProvider handled by the plugins.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ModelItemTypeExtensionPointThe Credential Provider Parameter Extension Pointstatic final StringThe avalon role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCredentialProviderModel(String pluginName, Configuration configuration) Add a credential provider modelvoidaddExtension(String id, String pluginName, String featureName, Configuration configuration) Add an extension to this point.protected voidconfigureParamChecker(ItemCheckerParser parser, Configuration configuration, String pluginName, Map<String, ItemCheckerDescriptor> parameterCheckers) Configure a parameter checker of a user directoryprotected voidconfigureParameters(CredentialProviderFactory.CredentialProviderModelParameterParser paramParser, Configuration configuration, String pluginName, Map<String, ElementDefinition> parameters) Configure a parameter to access the credential providervoidcontextualize(Context context) Creates a instance ofCredentialProvidervoiddispose()getExtension(String id) Returns the named extensionReturns a Set containing the ids of all known extensionsbooleanhasExtension(String id) Returns true if the named extension existsvoidvoidFinalize the initialization of the extensions.
This method is called after alladdExtension()calls.
This is the last step before the actual startup of the application.voidservice(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.plugin.ExtensionPoint
deferredInitializeExtensions
-
Field Details
-
ROLE
The avalon role -
_credentialProviderParameterTypeExtensionPoint
The Credential Provider Parameter Extension Point
-
-
Constructor Details
-
CredentialProviderFactory
public CredentialProviderFactory()
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
dispose
- Specified by:
disposein interfaceDisposable
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
createCredentialProvider
public CredentialProvider createCredentialProvider(String id, String modelId, Map<String, Object> paramsValues, String label) Creates a instance ofCredentialProvider- Parameters:
id- The unique id of this credential provider instancemodelId- The id of the credential provider modelparamsValues- the parameters's valueslabel- The optional label- Returns:
- a credential provider
-
addExtension
public void addExtension(String id, String pluginName, String featureName, Configuration configuration) throws ConfigurationException Description copied from interface:ExtensionPointAdd an extension to this point. Each implementation knows the meaning of the given configuration.- Specified by:
addExtensionin interfaceExtensionPoint<CredentialProviderModel>- Parameters:
id- the unique identifier of the extension.pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)configuration- the information about the extension to be added- Throws:
ConfigurationException- when a configuration problem occurs
-
addCredentialProviderModel
protected void addCredentialProviderModel(String pluginName, Configuration configuration) throws ConfigurationException Add a credential provider model- Parameters:
pluginName- The plugin nameconfiguration- The configuration- Throws:
ConfigurationException- when a configuration problem occurs
-
configureParameters
protected void configureParameters(CredentialProviderFactory.CredentialProviderModelParameterParser paramParser, Configuration configuration, String pluginName, Map<String, ElementDefinition> parameters) throws ConfigurationExceptionConfigure a parameter to access the credential provider- Parameters:
paramParser- the parameter parser.configuration- The parameter configuration.pluginName- The plugin nameparameters- The model's parameters- Throws:
ConfigurationException- if configuration is incomplete or invalid.
-
configureParamChecker
protected void configureParamChecker(ItemCheckerParser parser, Configuration configuration, String pluginName, Map<String, ItemCheckerDescriptor> parameterCheckers) throws ConfigurationExceptionConfigure a parameter checker of a user directory- Parameters:
parser- the parameter checker parser.configuration- The parameter checker configuration.pluginName- The plugin nameparameterCheckers- The model's parameter checkers- Throws:
ConfigurationException- if configuration is incomplete or invalid.
-
initializeExtensions
Description copied from interface:ExtensionPointFinalize the initialization of the extensions.
This method is called after alladdExtension()calls.
This is the last step before the actual startup of the application.- Specified by:
initializeExtensionsin interfaceExtensionPoint<CredentialProviderModel>- Throws:
Exception- if something wrong occurs
-
hasExtension
Description copied from interface:ExtensionPointReturns true if the named extension exists- Specified by:
hasExtensionin interfaceExtensionPoint<CredentialProviderModel>- Parameters:
id- the unique id of the extension- Returns:
- true if the named extension exists
-
getExtension
Description copied from interface:ExtensionPointReturns the named extension- Specified by:
getExtensionin interfaceExtensionPoint<CredentialProviderModel>- Parameters:
id- the unique id of the extension- Returns:
- the named extension
-
getExtensionsIds
Description copied from interface:ExtensionPointReturns a Set containing the ids of all known extensions- Specified by:
getExtensionsIdsin interfaceExtensionPoint<CredentialProviderModel>- Returns:
- a Set containing the ids of all known extensions
-