Class AbstractThreadSafeComponentExtensionPoint<T>
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.plugin.component.AbstractThreadSafeComponentExtensionPoint<T>
- Type Parameters:
T- the type of the managed extensions
- All Implemented Interfaces:
LogEnabled,ExtensionPoint<T>,Disposable,Initializable,Component,Contextualizable,Serviceable,ThreadSafe
- Direct Known Subclasses:
AbstractClientSideExtensionPoint,AbstractSelectorExtensionPoint,AbstractThreadSafeComponentPrioritizableExtensionPoint,AbstractThreadSafeComponentSupporterExtensionPoint,AccessControllerExtensionPoint,ActionExtensionPoint,ActivityNotifierExtensionPoint,ActivityTypeExtensionPoint,AdditionalPropertyIndexerExtensionPoint,AdministratorNotificatorExtensionPoint,AllowedUsersActionAdditionalOperationsExtensionPoint,AmetysObjectFactoryExtensionPoint,ApogeeExportExtensionPoint,ApplicationGlyphManager,ArchiverExtensionPoint,AutomaticNewsletterExtensionPoint,BackgroundEngineHookExtensionPoint,BackOfficeRequestProxyExtensionPoint,CaptchaExtensionPoint,CategoryProviderExtensionPoint,CDMfrExtensionPoint,CDMFrSyncExtensionPoint,ChoiceSourceTypeExtensionPoint,ComputingTypeExtensionPoint,ContentFilterExtensionPoint,ContentImporterExtensionPoint,ContentInputDataExtensionPoint,ContentTypeExtensionPoint,ContentTypeOverridesExtensionPoint,ContentVisibleAttachmentIndexerExtensionPoint,CopyCatalogUpdaterExtensionPoint,CopyFormUpdaterExtensionPoint,CopyODFContentUpdaterExtensionPoint,CopyUpdaterExtensionPoint,DataSourceConsumerExtensionPoint,DataSourceFactoryExtensionPoint,DispatchProcessExtensionPoint,DocbookUpdateHandlerExtensionPoint,Document2ImagesConvertorPolicyExtensionPoint,DocumentProviderExtensionPoint,DynamicContentTypeDescriptorExtentionPoint,DynamicInformationProviderExtensionPoint,EnhancedConditionExtensionPoint,EnhancedFunctionExtensionPoint,EqTDComputationModeExtensionPoint,ExternalizableDataProviderExtensionPoint,ExternalLogExtensionPoint,FormQuestionDataTypeExtensionPoint,FormQuestionTypeExtensionPoint,FrontCacheableResourceExtensionPoint,GDPRComponentExtensionPoint,GDPRServicesExtensionPoint,GetTokenExtensionPoint,HTMLUpdateHandlerExtensionPoint,InitExtensionPoint,InputDataExtensionPoint,JSASSResourceURIExtensionPoint,LivePopulatorExtensionPoint,MBeanExtensionPoint,ModelItemTypeExtensionPoint,MonitoringExtensionPoint,OaiSetExtensionPoint,OauthProviderExtensionPoint,ObserverExtensionPoint,OSEExportExtensionPoint,PageElementCachePolicyExtensionPoint,PageFilterExtensionPoint,PageVisibleAttachmentIndexerExtensionPoint,PipelineSerializerModelExtensionPoint,PluginArchiverExtensionPoint,PopulationConsumerExtensionPoint,ProgramTranslationUpdaterExtensionPoint,RemoteUrlExtensionPoint,ReportExtensionPoint,ResourceMetadataPopulatorExtensionPoint,ReturnableExtensionPoint,RibbonImportManager,RightContextConvertorExtensionPoint,RunnableExtensionPoint,SassFunctionsProviderExtensionPoint,SchedulableExtensionPoint,SchemaDefinitionProviderExtensionPoint,ScriptBindingExtensionPoint,SearchableExtensionPoint,SearchComponentExtensionPoint,SearchModuleExtensionPoint,SearchUIModelExtensionPoint,ServiceExtensionPoint,SiteConfigurationExtensionPoint,SiteDocumentProviderExtensionPoint,SitePluginArchiverExtensionPoint,SiteTypesExtensionPoint,SQLDatabaseTypeExtensionPoint,StatisticsProviderExtensionPoint,SupportedContextResourceUriExtensionPoint,SynchronizeContentsCollectionModelExtensionPoint,SynchronizingContentOperatorExtensionPoint,SystemPropertyExtensionPoint,TagTargetTypeExtensionPoint,TreeExtensionPoint,URIResolverExtensionPoint,UserPreferencesExtensionPoint,VersionHandlerExtensionPoint,VersionStorageExtensionPoint,VirtualPageConfigurationExtensionPoint,WebAnalyticsProviderExtensionPoint,WelcomeStepExtensionPoint,WidgetsManager,WorkflowDefinitionExtensionPoint,WorkflowFormMailExtensionPoint,WorkspaceModuleExtensionPoint
public abstract class AbstractThreadSafeComponentExtensionPoint<T>
extends AbstractLogEnabled
implements ExtensionPoint<T>, Component, ThreadSafe, Serviceable, Initializable, Disposable, Contextualizable
Avalon based implementation of an ExtensionPoint.
Subclasses only need to call
Subclasses only need to call
addComponent() for each new extension.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ServiceManagerAvalon service managerprotected ContextAvalon contextprotected ThreadSafeComponentManager<T>Avalon ComponentManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddComponent(String pluginName, String featureName, String role, Class<? extends T> clazz, Configuration configuration) Adds a Component to the underlying ComponentManager.voidaddExtension(String id, String pluginName, String featureName, Configuration configuration) Add an extension to this point.voidcontextualize(Context context) voiddispose()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 manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_manager
Avalon ComponentManager -
_cocoonManager
Avalon service manager -
_context
Avalon context
-
-
Constructor Details
-
AbstractThreadSafeComponentExtensionPoint
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Throws:
Exception
-
dispose
- Specified by:
disposein interfaceDisposable
-
addComponent
protected void addComponent(String pluginName, String featureName, String role, Class<? extends T> clazz, Configuration configuration) throws ComponentException Adds a Component to the underlying ComponentManager. Each extension to this ExtensionPoint may be considered as a Component.- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- The feature name (unique for a given pluginName).role- the Avalon roleclazz- the class of the componentconfiguration- the configuration of the component- Throws:
ComponentException- if an error occured whil setting up components
-
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<T>- Throws:
Exception- if something wrong occurs
-
getExtension
Description copied from interface:ExtensionPointReturns the named extension- Specified by:
getExtensionin interfaceExtensionPoint<T>- Parameters:
id- the unique id of the extension- Returns:
- the named extension
-
hasExtension
Description copied from interface:ExtensionPointReturns true if the named extension exists- Specified by:
hasExtensionin interfaceExtensionPoint<T>- Parameters:
id- the unique id of the extension- Returns:
- true if the named extension exists
-
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<T>- 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
-
getExtensionsIds
Description copied from interface:ExtensionPointReturns a Set containing the ids of all known extensions- Specified by:
getExtensionsIdsin interfaceExtensionPoint<T>- Returns:
- a Set containing the ids of all known extensions
-