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
Fields Modifier and Type Field Description static int
ACTIVATED
Component activation successfulstatic int
ACTIVATING
Before component activationstatic int
DEACTIVATING
static int
REGISTERED
static int
RESOLVED
Component dependencies are resolvedstatic int
START_FAILURE
Notification of applicationStarted failsstatic int
STARTED
Component was startedstatic int
STARTING
The component is being startedstatic int
STOPPING
The component is being stoppedstatic int
UNREGISTERED
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<ComponentName>
getAliases()
Gets the list of aliases.int
getApplicationStartedOrder()
The component notification order forComponentManager.start()
.String
getBundle()
Get the owner bundle symbolic name of that component.ComponentInstance
getComponent()
Gets the component instance or null if the component was not yet activated.RuntimeContext
getContext()
Gets the runtime context that created this registration info.String
getDocumentation()
Gets any comments on this component.default Optional<ExtensionPoint>
getExtensionPoint(String name)
Gets the defined extension points with name.ExtensionPoint[]
getExtensionPoints()
Gets the defined extension points.Extension[]
getExtensions()
Gets the extensions contributed by this component.String
getImplementation()
Give the class name for the component implementation if this is a java componentComponentManager
getManager()
Gets the component manager.ComponentName
getName()
Gets the name of the component.Map<String,Property>
getProperties()
Gets the component properties.String[]
getProvidedServiceNames()
Gets the list of provided services or null if no service is provided.Set<ComponentName>
getRequiredComponents()
Gets the list of the required components.String
getSourceId()
The id of the content source used to create the registration (usually a StreamRef id)int
getState()
Gets the component state.Version
getVersion()
Gets the component version.URL
getXmlFileUrl()
Retrieve the URL of the XML file used to declare the componentboolean
isActivated()
Checks whether this component is activated.boolean
isDisabled()
Whether this component is disabled.boolean
isPersistent()
Whether or not this registration is persisted by the user (not part of a real bundle).boolean
isResolved()
Checks whether this component is resolved (i.e.boolean
isStarted()
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
useFormerLifecycleManagement()
DON'T USE THIS METHOD - INTERNAL API.
-
-
-
Field Detail
-
UNREGISTERED
static final int UNREGISTERED
- See Also:
- Constant Field Values
-
REGISTERED
static final int REGISTERED
- See Also:
- Constant Field Values
-
RESOLVED
static final int RESOLVED
Component dependencies are resolved- See Also:
- Constant Field Values
-
ACTIVATING
static final int ACTIVATING
Before component activation- See Also:
- Constant Field Values
-
DEACTIVATING
static final int DEACTIVATING
- See Also:
- Constant Field Values
-
ACTIVATED
static final int ACTIVATED
Component activation successful- See Also:
- Constant Field Values
-
START_FAILURE
static final int START_FAILURE
Notification of applicationStarted fails- Since:
- 7.4
- See Also:
- Constant Field Values
-
STARTED
static final int STARTED
Component was started- Since:
- 9.2
- See Also:
- Constant Field Values
-
STARTING
static final int STARTING
The component is being started- See Also:
- Constant Field Values
-
STOPPING
static final int STOPPING
The component is being stopped- See Also:
- Constant Field Values
-
-
Method Detail
-
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
Map<String,Property> 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
default Optional<ExtensionPoint> getExtensionPoint(String name)
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
-
-