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:
ActionService,AnnotationServiceImpl,AuditComponent,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,LibrarySelectorService,LifeCycleServiceImpl,LocalConfigurationServiceImpl,LocaleComponent,LocationManagerService,LockManagerService,LoginAsComponent,LoginComponent,MailServiceImpl,MailServiceImpl,ManagedComponent,MarshallerRegistryImpl,MemAuditBackendFactory,MemRepositoryService,MetricComponent,MetricsServiceImpl,MigrationServiceImpl,MimetypeRegistryService,MongoDBAuditBackendFactory,MongoDBComponent,MongoDBRepositoryService,MultiTenantServiceImpl,NotificationService,NuxeoAdobeConnectorServiceImpl,NuxeoCmisServiceFactoryManager,NuxeoDriveManagerImpl,NuxeoRepositories,NXAuditEventsService,OAuth2ClientServiceImpl,OAuth2ServiceProviderRegistryImpl,OAuth2TokenServiceImpl,OAuthConsumerRegistryImpl,OAuthServerKeyManagerImpl,OAuthServiceProviderRegistryImpl,OAuthTokenStoreImpl,ObjectResolverServiceImpl,OpenIDConnectProviderRegistryImpl,OpenSearchAuditBackendFactory,OpenSearchComponent,OpenSearchEmbedComponent,OpenSearchSearchClientFactory,PackageUpdateComponent,PageProviderServiceImpl,PathSegmentComponent,PDFTransformationServiceImpl,PersistenceComponent,PlatformManagementComponent,PluggableAuthenticationService,PreviewAdapterManagerComponent,PropertiesMappingComponent,PublisherServiceImpl,PubSubServiceImpl,QueryMakerServiceImpl,QuotaSizeServiceImpl,QuotaStatsServiceImpl,RelationService,ReloadComponent,RenderingServiceImpl,RenditionServiceImpl,RepositoryManagerImpl,RepositorySearchClientFactory,RepositoryService,RequestControllerService,RequestFilterService,ResourcePublisherService,ResourceService,RestAPIServiceImpl,RootServiceImpl,RuntimeComponent,ScannedFileMapperComponent,SchedulerServiceImpl,ScimV2MappingServiceImpl,ScrollComponent,SearchComponent,SecurityService,ServerComponent,ServerLocatorService,ServletRegistryComponent,ShibbolethAuthenticationServiceImpl,SignatureServiceImpl,SQLAuditBackendFactory,SQLRepositoryCompatService,SQLRepositoryService,StandbyComponent,StreamServiceImpl,SuggestionServiceImpl,TagServiceImpl,TargetPlatformServiceImpl,TaskServiceImpl,TemplateProcessorComponent,TemplateSerializerServiceImpl,ThumbnailServiceImpl,TransientDataServiceImpl,TransientStorageComponent,TrashServiceImpl,TypeService,TypeService,UIDGeneratorComponent,UserInvitationComponent,UserMapperComponent,UserPreferencesServiceImpl,UserProfileServiceImpl,UserService,UserWorkspaceServiceImplComponent,VersioningComponent,VersioningManagerImpl,VideoServiceImpl,VideoToolsServiceImpl,WebEngineComponent,WebResourceManagerImpl,WOPIServiceImpl,WorkManagerImpl,XMLImporterComponent
Empty implementation for a component.
- Author:
- Bogdan Stefanescu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(ComponentContext context) Activates the component.protected voidaddRuntimeMessage(RuntimeMessage.Level level, String message) protected voidaddRuntimeMessage(RuntimeMessage.Level level, String message, RuntimeMessage.Source source, String sourceComponent) voiddeactivate(ComponentContext context) Deactivates the component.<T> TgetAdapter(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 DescriptorRegistryprotected booleanregister(String xp, Descriptor descriptor) voidregisterContribution(Object contribution, String xp, ComponentInstance component) voidregisterExtension(Extension extension) Registers the given extension.voidsetLastModified(Long lastModified) Sets the last modified date.protected voidSets the last modified date to current date timestampvoidSets the name for this component, as it was defined in its XML.voidstart(ComponentContext context) Start the component.voidstop(ComponentContext context) Stop the component.protected booleanunregister(String xp, Descriptor descriptor) voidunregisterContribution(Object contribution, String xp, ComponentInstance component) voidunregisterExtension(Extension extension) Unregisters the given extension.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ComponentSets 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:ComponentActivates the component.This method is called by the runtime when a component is activated.
-
deactivate
Description copied from interface:ComponentDeactivates the component.This method is called by the runtime when a component is deactivated.
- Specified by:
deactivatein 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:ExtensibleRegisters the given extension.- Specified by:
registerExtensionin interfaceExtensible- Parameters:
extension- the extension to register
-
unregisterExtension
Description copied from interface:ExtensibleUnregisters the given extension.- Specified by:
unregisterExtensionin interfaceExtensible- Parameters:
extension- the extension to unregister
-
registerContribution
-
unregisterContribution
-
getAdapter
Description copied from interface:AdaptableReturns an object which is an instance of the given class associated with this object. Returnsnullif no such object can be found.- Specified by:
getAdapterin interfaceAdaptable- Parameters:
adapter- the adapter class to look up- Returns:
- a object castable to the given class, or
nullif this object does not have an adapter for the given class
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated -
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Throws:
InterruptedException
-
setModifiedNow
protected void setModifiedNow()Sets the last modified date to current date timestamp- Since:
- 5.6
-
getLastModified
Description copied from interface:TimestampedServiceReturns 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:
getLastModifiedin interfaceTimestampedService- See Also:
-
setLastModified
Description copied from interface:TimestampedServiceSets the last modified date.This method is supposed to be called whenever the component/service resources or state changes.
- Specified by:
setLastModifiedin interfaceTimestampedService- See Also:
-
getRegistry
- Since:
- 10.3
-
register
- Since:
- 10.3
-
unregister
- Since:
- 10.3
-
getDescriptor
- Since:
- 10.3
-
getDescriptors
- Since:
- 10.3
-