Class ResourceMetadataPopulatorExtensionPoint
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<ResourceMetadataPopulator>
-
- org.ametys.plugins.explorer.resources.metadata.populate.ResourceMetadataPopulatorExtensionPoint
-
- All Implemented Interfaces:
LogEnabled
,ExtensionPoint<ResourceMetadataPopulator>
,Disposable
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class ResourceMetadataPopulatorExtensionPoint extends AbstractThreadSafeComponentExtensionPoint<ResourceMetadataPopulator>
Extension point forResourceMetadataPopulator
s.
-
-
Field Summary
Fields Modifier and Type Field Description private Map<String,Set<ResourceMetadataPopulator>>
_types
static String
ROLE
Avalon Role-
Fields inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
_cocoonManager, _context, _manager
-
-
Constructor Summary
Constructors Constructor Description ResourceMetadataPopulatorExtensionPoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPopulator(String type, ResourceMetadataPopulator populator)
Add the populator to the map.Collection<ResourceMetadataPopulator>
getPopulators(String type)
Returns theResourceMetadataPopulator
s corresponding to the given type.void
initializeExtensions()
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.protected void
initializePopulatorMap()
Initialize the populator map by type.-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint
addComponent, addExtension, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
ResourceMetadataPopulatorExtensionPoint
public ResourceMetadataPopulatorExtensionPoint()
-
-
Method Detail
-
initializeExtensions
public void initializeExtensions() throws Exception
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<ResourceMetadataPopulator>
- Overrides:
initializeExtensions
in classAbstractThreadSafeComponentExtensionPoint<ResourceMetadataPopulator>
- Throws:
Exception
- if something wrong occurs
-
initializePopulatorMap
protected void initializePopulatorMap()
Initialize the populator map by type.
-
addPopulator
protected void addPopulator(String type, ResourceMetadataPopulator populator)
Add the populator to the map.- Parameters:
type
- the mime type or the empty string.populator
- the populator.
-
getPopulators
public Collection<ResourceMetadataPopulator> getPopulators(String type)
Returns theResourceMetadataPopulator
s corresponding to the given type.- Parameters:
type
- the MIME type.- Returns:
- a Collection of
ResourceMetadataPopulator
s, empty if there is no populator for the given type.
-
-