Package org.ametys.core.group.directory
Class GroupDirectoryFactory
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.group.directory.GroupDirectoryFactory
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<GroupDirectoryModel>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class GroupDirectoryFactory
extends AbstractLogEnabled
implements ExtensionPoint<GroupDirectoryModel>, Initializable, ThreadSafe, Component, Serviceable, Contextualizable, Disposable
This extension point handles a list of
GroupDirectoryModel
handled by the plugins.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionThe Group Directory parameters Extension Pointstatic final String
The avalon role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtension
(String id, String pluginName, String featureName, Configuration configuration) Add an extension to this point.protected void
addGroupDirectoryModel
(String pluginName, Configuration configuration) Add a group directory modelprotected void
configureParameters
(GroupDirectoryFactory.GroupDirectoryModelParameterParser paramParser, Configuration configuration, String pluginName, Map<String, ElementDefinition> parameters) Configure a parameter to access the group directoryvoid
contextualize
(Context context) createGroupDirectory
(String id, I18nizableText label, String modelId, Map<String, Object> paramsValues) Creates a instance ofGroupDirectory
void
dispose()
getExtension
(String id) Returns the named extensionReturns a Set containing the ids of all known extensionsboolean
hasExtension
(String id) Returns true if the named extension existsvoid
void
Finalize the initialization of the extensions.
This method is called after alladdExtension()
calls.
This is the last step before the actual startup of the application.void
service
(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role -
_groupDirectoryParameterTypeExtensionPoint
The Group Directory parameters Extension Point
-
-
Constructor Details
-
GroupDirectoryFactory
public GroupDirectoryFactory()
-
-
Method Details
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
dispose
- Specified by:
dispose
in interfaceDisposable
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
createGroupDirectory
public GroupDirectory createGroupDirectory(String id, I18nizableText label, String modelId, Map<String, Object> paramsValues) Creates a instance ofGroupDirectory
- Parameters:
id
- The id of the group directorylabel
- The label of the group directorymodelId
- The id of the group directory modelparamsValues
- The parameters's values- Returns:
- a group directory
-
addExtension
public void addExtension(String id, String pluginName, String featureName, Configuration configuration) throws ConfigurationException Description copied from interface:ExtensionPoint
Add an extension to this point. Each implementation knows the meaning of the given configuration.- Specified by:
addExtension
in interfaceExtensionPoint<GroupDirectoryModel>
- 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
-
addGroupDirectoryModel
protected void addGroupDirectoryModel(String pluginName, Configuration configuration) throws ConfigurationException Add a group directory model- Parameters:
pluginName
- The plugin nameconfiguration
- The configuration- Throws:
ConfigurationException
- when a configuration problem occurs
-
configureParameters
protected void configureParameters(GroupDirectoryFactory.GroupDirectoryModelParameterParser paramParser, Configuration configuration, String pluginName, Map<String, ElementDefinition> parameters) throws ConfigurationExceptionConfigure a parameter to access the group directory- 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.
-
initializeExtensions
Description copied from interface:ExtensionPoint
Finalize 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:
initializeExtensions
in interfaceExtensionPoint<GroupDirectoryModel>
- Throws:
Exception
- if something wrong occurs
-
hasExtension
Description copied from interface:ExtensionPoint
Returns true if the named extension exists- Specified by:
hasExtension
in interfaceExtensionPoint<GroupDirectoryModel>
- Parameters:
id
- the unique id of the extension- Returns:
- true if the named extension exists
-
getExtension
Description copied from interface:ExtensionPoint
Returns the named extension- Specified by:
getExtension
in interfaceExtensionPoint<GroupDirectoryModel>
- Parameters:
id
- the unique id of the extension- Returns:
- the named extension
-
getExtensionsIds
Description copied from interface:ExtensionPoint
Returns a Set containing the ids of all known extensions- Specified by:
getExtensionsIds
in interfaceExtensionPoint<GroupDirectoryModel>
- Returns:
- a Set containing the ids of all known extensions
-