Class SynchronizeContentsCollectionModelExtensionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.contentio.synchronize.SynchronizeContentsCollectionModelExtensionPoint
-
- All Implemented Interfaces:
LogEnabled,ExtensionPoint<SynchronizableContentsCollectionModel>,Disposable,Initializable,Component,Contextualizable,Serviceable,ThreadSafe
public class SynchronizeContentsCollectionModelExtensionPoint extends AbstractLogEnabled implements ExtensionPoint<SynchronizableContentsCollectionModel>, Initializable, ThreadSafe, Component, Serviceable, Contextualizable, Disposable
Extension point forSynchronizableContentsCollectionModels.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSynchronizeContentsCollectionModelExtensionPoint.SynchronizableContentsCollectionModelParameterParserClass for parsing parameters of aSynchronizableContentsCollectionModel
-
Field Summary
Fields Modifier and Type Field Description private Context_contextprivate Map<String,SynchronizableContentsCollectionModel>_sccModelsprivate ServiceManager_smanagerstatic StringROLEAvalon Role
-
Constructor Summary
Constructors Constructor Description SynchronizeContentsCollectionModelExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExtension(String id, String pluginName, String featureName, Configuration configuration)Add an extension to this point.protected voidaddModel(String pluginName, Configuration configuration)Add a synchronizable contents collection modelprotected voidconfigureParameters(SynchronizeContentsCollectionModelExtensionPoint.SynchronizableContentsCollectionModelParameterParser paramParser, Configuration configuration, String pluginName, Map<String,Parameter<ParameterHelper.ParameterType>> parameters)Configure a parameter to access the SynchronizableContentsCollectionvoidcontextualize(Context context)voiddispose()SynchronizableContentsCollectionModelgetExtension(String id)Returns the named extensionSet<String>getExtensionsIds()Returns a Set containing the ids of all known extensionsbooleanhasExtension(String id)Returns true if the named extension existsvoidinitialize()voidinitializeExtensions()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.voidservice(ServiceManager smanager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_sccModels
private Map<String,SynchronizableContentsCollectionModel> _sccModels
-
_smanager
private ServiceManager _smanager
-
-
Constructor Detail
-
SynchronizeContentsCollectionModelExtensionPoint
public SynchronizeContentsCollectionModelExtensionPoint()
-
-
Method Detail
-
initialize
public void initialize() throws Exception
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
dispose
public void dispose()
- Specified by:
disposein interfaceDisposable
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
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<SynchronizableContentsCollectionModel>- 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
-
addModel
protected void addModel(String pluginName, Configuration configuration) throws ConfigurationException
Add a synchronizable contents collection model- Parameters:
pluginName- The plugin nameconfiguration- The configuration- Throws:
ConfigurationException- when a configuration problem occurs
-
configureParameters
protected void configureParameters(SynchronizeContentsCollectionModelExtensionPoint.SynchronizableContentsCollectionModelParameterParser paramParser, Configuration configuration, String pluginName, Map<String,Parameter<ParameterHelper.ParameterType>> parameters) throws ConfigurationException
Configure a parameter to access the SynchronizableContentsCollection- Parameters:
paramParser- the parameter parser.configuration- The parameter configuration.pluginName- The plugin nameparameters- The model parameters- Throws:
ConfigurationException- if configuration is incomplete or invalid.
-
initializeExtensions
public void initializeExtensions() throws Exception
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<SynchronizableContentsCollectionModel>- Throws:
Exception- if something wrong occurs
-
hasExtension
public boolean hasExtension(String id)
Description copied from interface:ExtensionPointReturns true if the named extension exists- Specified by:
hasExtensionin interfaceExtensionPoint<SynchronizableContentsCollectionModel>- Parameters:
id- the unique id of the extension- Returns:
- true if the named extension exists
-
getExtension
public SynchronizableContentsCollectionModel getExtension(String id)
Description copied from interface:ExtensionPointReturns the named extension- Specified by:
getExtensionin interfaceExtensionPoint<SynchronizableContentsCollectionModel>- Parameters:
id- the unique id of the extension- Returns:
- the named extension
-
getExtensionsIds
public Set<String> getExtensionsIds()
Description copied from interface:ExtensionPointReturns a Set containing the ids of all known extensions- Specified by:
getExtensionsIdsin interfaceExtensionPoint<SynchronizableContentsCollectionModel>- Returns:
- a Set containing the ids of all known extensions
-
-