Package org.nuxeo.runtime.model
Class DefaultComponent
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
- All Implemented Interfaces:
Adaptable
,Component
,Extensible
,TimestampedService
- Direct Known Subclasses:
AbstractLayoutManager
,ActionService
,AnnotationServiceImpl
,AutomationComponent
,AutomationScriptingComponent
,AutomationServerComponent
,AvroComponent
,AWSConfigurationServiceImpl
,BatchManagerComponent
,BinaryMetadataComponent
,BlobHolderAdapterComponent
,BlobManagerComponent
,BulkComponent
,CacheServiceImpl
,CapabilitiesServiceImpl
,CertServiceImpl
,CharacterFilteringServiceImpl
,ClusterActionServiceImpl
,ClusterServiceImpl
,CodecServiceImpl
,CollectionManagerImpl
,CommandLineExecutorComponent
,CommentService
,ComputedGroupsServiceImpl
,ConfigurationServiceImpl
,ConnectClientComponent
,ContentTemplateServiceImpl
,ContributionPersistenceComponent
,ConversionServiceImpl
,CoreManagementComponent
,CoreService
,CoreSessionServiceImpl
,CounterManagerImpl
,CUserServiceImpl
,DataSourceComponent
,DBSRepositoryService
,DefaultDirectoryFactory
,DefaultImporterComponent
,DefaultMonitorComponent
,DeputyManagementService
,DirectoryServiceImpl
,DmkComponent
,DocumentAdapterService
,DocumentBlobManagerComponent
,DocumentRoutingEngineServiceImpl
,DocumentRoutingServiceImpl
,DocumentValidationServiceImpl
,DocumentViewCodecService
,DownloadServiceImpl
,DublinCoreStorageServiceImpl
,ElasticSearchComponent
,ELServiceComponent
,EventService
,EventServiceComponent
,ExceptionHandlingComponent
,FavoritesManagerImpl
,FileEventTracker
,FileManagerService
,FileSystemItemAdapterServiceImpl
,FreemarkerComponent
,FSExporter
,HtmlSanitizerServiceImpl
,ImagingComponent
,IOComponent
,IOManagerComponent
,JtaActivator
,JWTServiceImpl
,KafkaConfigServiceImpl
,KeyManagerImpl
,KeyValueServiceImpl
,LayoutStoreImpl
,LibrarySelectorService
,LifeCycleServiceImpl
,LocalConfigurationServiceImpl
,LocaleComponent
,LocationManagerService
,LockManagerService
,LoginAsComponent
,LoginComponent
,MailServiceImpl
,MailServiceImpl
,ManagedComponent
,MarshallerRegistryImpl
,MemRepositoryService
,MetricComponent
,MetricsServiceImpl
,MigrationServiceImpl
,MimetypeRegistryService
,MongoDBComponent
,MongoDBRepositoryService
,MultiTenantServiceImpl
,NotificationService
,NuxeoAdobeConnectorServiceImpl
,NuxeoCmisServiceFactoryManager
,NuxeoDriveManagerImpl
,NuxeoRepositories
,NXAuditEventsService
,OAuth2ClientServiceImpl
,OAuth2ServiceProviderRegistryImpl
,OAuth2TokenServiceImpl
,OAuthConsumerRegistryImpl
,OAuthServerKeyManagerImpl
,OAuthServiceProviderRegistryImpl
,OAuthTokenStoreImpl
,ObjectResolverServiceImpl
,OpenIDConnectProviderRegistryImpl
,PackageUpdateComponent
,PageProviderServiceImpl
,PathSegmentComponent
,PDFTransformationServiceImpl
,PersistenceComponent
,PlatformManagementComponent
,PluggableAuthenticationService
,PreviewAdapterManagerComponent
,PropertiesMappingComponent
,PublisherServiceImpl
,PubSubServiceImpl
,QueryMakerServiceImpl
,QuotaSizeServiceImpl
,QuotaStatsServiceImpl
,RelationService
,ReloadComponent
,RenderingServiceImpl
,RenditionServiceImpl
,RepositoryManagerImpl
,RepositoryService
,RequestControllerService
,RequestFilterService
,ResourcePublisherService
,ResourceService
,RestAPIServiceImpl
,RootServiceImpl
,RuntimeComponent
,ScannedFileMapperComponent
,SchedulerServiceImpl
,ScimV2MappingServiceImpl
,ScrollComponent
,SecurityService
,ServerComponent
,ServerLocatorService
,ServletRegistryComponent
,ShibbolethAuthenticationServiceImpl
,SignatureServiceImpl
,SQLRepositoryCompatService
,SQLRepositoryService
,StandbyComponent
,StreamServiceImpl
,SuggestionServiceImpl
,TagServiceImpl
,TargetPlatformServiceImpl
,TaskServiceImpl
,TemplateProcessorComponent
,TemplateSerializerServiceImpl
,ThemeStylingServiceImpl
,ThreeDServiceImpl
,ThumbnailServiceImpl
,TransientStorageComponent
,TrashServiceImpl
,TypeService
,TypeService
,UIDGeneratorComponent
,UserInvitationComponent
,UserMapperComponent
,UserPreferencesServiceImpl
,UserProfileServiceImpl
,UserService
,UserWorkspaceServiceImplComponent
,VersioningComponent
,VersioningManagerImpl
,VideoServiceImpl
,VideoToolsServiceImpl
,WebDavService
,WebEngineComponent
,WebResourceManagerImpl
,WOPIServiceImpl
,WorkManagerImpl
,XMLImporterComponent
Empty implementation for a component.
- Author:
- Bogdan Stefanescu
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(ComponentContext context) Activates the component.protected void
addRuntimeMessage
(RuntimeMessage.Level level, String message) protected void
addRuntimeMessage
(RuntimeMessage.Level level, String message, RuntimeMessage.Source source, String sourceComponent) void
deactivate
(ComponentContext context) Deactivates the component.<T> T
getAdapter
(Class<T> adapter) Returns an object which is an instance of the given class associated with this object.protected <T extends Descriptor>
TgetDescriptor
(String xp, String id) protected <T extends Descriptor>
List<T>getDescriptors
(String xp) Returns the last modification timestamp or null if unknown.protected DescriptorRegistry
protected boolean
register
(String xp, Descriptor descriptor) void
registerContribution
(Object contribution, String xp, ComponentInstance component) void
registerExtension
(Extension extension) Registers the given extension.void
setLastModified
(Long lastModified) Sets the last modified date.protected void
Sets the last modified date to current date timestampvoid
Sets the name for this component, as it was defined in its XML.void
start
(ComponentContext context) Start the component.void
stop
(ComponentContext context) Stop the component.protected boolean
unregister
(String xp, Descriptor descriptor) void
unregisterContribution
(Object contribution, String xp, ComponentInstance component) void
unregisterExtension
(Extension extension) Unregisters the given extension.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
name
- Since:
- 10.3
-
lastModified
- Since:
- 5.6
-
-
Constructor Details
-
DefaultComponent
public DefaultComponent()
-
-
Method Details
-
setName
Description copied from interface:Component
Sets the name for this component, as it was defined in its XML.This is called once after construction by the runtime framework.
-
activate
Description copied from interface:Component
Activates the component.This method is called by the runtime when a component is activated.
-
deactivate
Description copied from interface:Component
Deactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivate
in interfaceComponent
- Parameters:
context
- the runtime context
-
addRuntimeMessage
-
addRuntimeMessage
protected void addRuntimeMessage(RuntimeMessage.Level level, String message, RuntimeMessage.Source source, String sourceComponent) -
registerExtension
Description copied from interface:Extensible
Registers the given extension.- Specified by:
registerExtension
in interfaceExtensible
- Parameters:
extension
- the extension to register
-
unregisterExtension
Description copied from interface:Extensible
Unregisters the given extension.- Specified by:
unregisterExtension
in interfaceExtensible
- Parameters:
extension
- the extension to unregister
-
registerContribution
-
unregisterContribution
-
getAdapter
Description copied from interface:Adaptable
Returns an object which is an instance of the given class associated with this object. Returnsnull
if no such object can be found.- Specified by:
getAdapter
in interfaceAdaptable
- Parameters:
adapter
- the adapter class to look up- Returns:
- a object castable to the given class, or
null
if this object does not have an adapter for the given class
-
start
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated -
stop
Description copied from interface:Component
Stop the component.- Specified by:
stop
in interfaceComponent
- Throws:
InterruptedException
-
setModifiedNow
protected void setModifiedNow()Sets the last modified date to current date timestamp- Since:
- 5.6
-
getLastModified
Description copied from interface:TimestampedService
Returns the last modification timestamp or null if unknown.This method is useful for third-party code implementing caching on resources held by the component/service.
- Specified by:
getLastModified
in interfaceTimestampedService
- See Also:
-
setLastModified
Description copied from interface:TimestampedService
Sets the last modified date.This method is supposed to be called whenever the component/service resources or state changes.
- Specified by:
setLastModified
in interfaceTimestampedService
- See Also:
-
getRegistry
- Since:
- 10.3
-
register
- Since:
- 10.3
-
unregister
- Since:
- 10.3
-
getDescriptor
- Since:
- 10.3
-
getDescriptors
- Since:
- 10.3
-