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 Details

  • 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

      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 for ComponentManager.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 or ComponentRegistry should use the former way to manage component lifecycle.
      Since:
      9.3