Package org.nuxeo.runtime.model
Interface RegistrationInfo
- All Known Implementing Classes:
RegistrationInfoImpl
public interface RegistrationInfo
The component registration info.
A registration info object is keeping all the information needed to deploy a component, like the component implementation, properties, dependencies and also the defined extension points and contributed extensions.
When a component is activated the registration info is creating a component instance using the current runtime context.
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Component activation successfulstatic final int
Before component activationstatic final int
static final int
static final int
Component dependencies are resolvedstatic final int
Notification of applicationStarted failsstatic final int
Component was startedstatic final int
The component is being startedstatic final int
The component is being stoppedstatic final int
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of aliases.int
The component notification order forComponentManager.start()
.Get the owner bundle symbolic name of that component.Gets the component instance or null if the component was not yet activated.Gets the runtime context that created this registration info.Gets any comments on this component.default Optional<ExtensionPoint>
getExtensionPoint
(String name) Gets the defined extension points with name.Gets the defined extension points.Gets the extensions contributed by this component.Give the class name for the component implementation if this is a java componentGets the component manager.getName()
Gets the name of the component.Gets the component properties.String[]
Gets the list of provided services or null if no service is provided.Gets the list of the required components.The id of the content source used to create the registration (usually a StreamRef id)int
getState()
Gets the component state.Gets the component version.Retrieve the URL of the XML file used to declare the componentboolean
Checks whether this component is activated.boolean
Whether this component is disabled.boolean
Whether or not this registration is persisted by the user (not part of a real bundle).boolean
Checks whether this component is resolved (i.e. all its dependencies are satisfied).boolean
Checks whether this component is startedvoid
setPersistent
(boolean isPersistent) Set the persistent flag on this registrationvoid
setState
(int state) DON'T USE THIS METHOD - INTERNAL API.default boolean
DON'T USE THIS METHOD - INTERNAL API.
-
Field Details
-
UNREGISTERED
static final int UNREGISTERED- See Also:
-
REGISTERED
static final int REGISTERED- See Also:
-
RESOLVED
static final int RESOLVEDComponent dependencies are resolved- See Also:
-
ACTIVATING
static final int ACTIVATINGBefore component activation- See Also:
-
DEACTIVATING
static final int DEACTIVATING- See Also:
-
ACTIVATED
static final int ACTIVATEDComponent activation successful- See Also:
-
START_FAILURE
static final int START_FAILURENotification of applicationStarted fails- Since:
- 7.4
- See Also:
-
STARTED
static final int STARTEDComponent was started- Since:
- 9.2
- See Also:
-
STARTING
static final int STARTINGThe component is being started- See Also:
-
STOPPING
static final int STOPPINGThe component is being stopped- See Also:
-
-
Method Details
-
getVersion
Version getVersion()Gets the component version. -
getBundle
String getBundle()Get the owner bundle symbolic name of that component. If null the default owner is used. -
getDocumentation
String getDocumentation()Gets any comments on this component. -
getContext
RuntimeContext getContext()Gets the runtime context that created this registration info.- Returns:
- the runtime context
-
getProperties
Gets the component properties.- Returns:
- the component properties
-
getAliases
Set<ComponentName> getAliases()Gets the list of aliases.- Returns:
- the aliases
-
getRequiredComponents
Set<ComponentName> getRequiredComponents()Gets the list of the required components.- Returns:
- the required components
-
getExtensionPoints
ExtensionPoint[] getExtensionPoints()Gets the defined extension points.- Returns:
- the defined extension points
-
getExtensionPoint
Gets the defined extension points with name.- Parameters:
name
- the extension point name to retrieve- Returns:
- the defined extension points with name
- Since:
- 9.3
-
getExtensions
Extension[] getExtensions()Gets the extensions contributed by this component.- Returns:
- the contributed extensions
-
getName
ComponentName getName()Gets the name of the component.- Returns:
- the component name
-
isDisabled
boolean isDisabled()Whether this component is disabled. For now this is used only for persistent components. -
getComponent
ComponentInstance getComponent()Gets the component instance or null if the component was not yet activated.- Returns:
- the component instance
-
getState
int getState()Gets the component state.- Returns:
- the component state
-
getManager
ComponentManager getManager()Gets the component manager.- Returns:
- the component manager
-
isActivated
boolean isActivated()Checks whether this component is activated.- Returns:
- true if the component is activated, false otherwise
-
isResolved
boolean isResolved()Checks whether this component is resolved (i.e. all its dependencies are satisfied).- Returns:
- true if the component is resolved, false otherwise
-
isStarted
boolean isStarted()Checks whether this component is started- Since:
- 9.2
-
getProvidedServiceNames
String[] getProvidedServiceNames()Gets the list of provided services or null if no service is provided.- Returns:
- an array containing the service class names or null if no service are provided
-
isPersistent
boolean isPersistent()Whether or not this registration is persisted by the user (not part of a real bundle).- Returns:
- true if persisted, false otherwise
-
setPersistent
void setPersistent(boolean isPersistent) Set the persistent flag on this registration -
getImplementation
String getImplementation()Give the class name for the component implementation if this is a java component- Returns:
- class name
-
getXmlFileUrl
URL getXmlFileUrl()Retrieve the URL of the XML file used to declare the component- Returns:
- the XML file URL
-
getSourceId
String getSourceId()The id of the content source used to create the registration (usually a StreamRef id)- Since:
- 9.2
-
getApplicationStartedOrder
int getApplicationStartedOrder()The component notification order forComponentManager.start()
.- Returns:
- the order, 1000 by default
- Since:
- 5.6
-
setState
void setState(int state) DON'T USE THIS METHOD - INTERNAL API.- Parameters:
state
- the state to set in this registration info- Since:
- 9.3
-
useFormerLifecycleManagement
default boolean useFormerLifecycleManagement()DON'T USE THIS METHOD - INTERNAL API.This flag is used to introduce a new component lifecycle mechanism in order to introduce java pojo contribution. This allow us to rework how component manager handles the component, without changing how it handles component created by XML contributions (current behavior).
- Returns:
- whether or not
ComponentManager
orComponentRegistry
should use the former way to manage component lifecycle. - Since:
- 9.3
-