Class RegistrationInfoImpl

    • Constructor Detail

      • RegistrationInfoImpl

        public RegistrationInfoImpl()
      • RegistrationInfoImpl

        public RegistrationInfoImpl​(ComponentName name)
        Useful when dynamically registering components
        Parameters:
        name - the component name
    • Method Detail

      • attach

        public void attach​(ComponentManagerImpl manager)
        Attach to a manager - this method must be called after all registration fields are initialized.
      • isDisabled

        public boolean isDisabled()
        Description copied from interface: RegistrationInfo
        Whether this component is disabled. For now this is used only for persistent components.
        Specified by:
        isDisabled in interface RegistrationInfo
      • isPersistent

        public final boolean isPersistent()
        Description copied from interface: RegistrationInfo
        Whether or not this registration is persisted by the user (not part of a real bundle).
        Specified by:
        isPersistent in interface RegistrationInfo
        Returns:
        true if persisted, false otherwise
      • setPersistent

        public void setPersistent​(boolean isPersistent)
        Description copied from interface: RegistrationInfo
        Set the persistent flag on this registration
        Specified by:
        setPersistent in interface RegistrationInfo
      • destroy

        public void destroy()
      • isDisposed

        public final boolean isDisposed()
      • reload

        @Deprecated
        public void reload()
        Deprecated.
        since 9.3, but in fact since 5.6, see only usage in LiveInstallTask#reloadComponent
        Reload the underlying component if reload is supported
      • getBundle

        public String getBundle()
        Description copied from interface: RegistrationInfo
        Get the owner bundle symbolic name of that component. If null the default owner is used.
        Specified by:
        getBundle in interface RegistrationInfo
      • setState

        public void setState​(int state)
        Description copied from interface: RegistrationInfo
        DON'T USE THIS METHOD - INTERNAL API.
        Specified by:
        setState in interface RegistrationInfo
        Parameters:
        state - the state to set in this registration info
      • restart

        @Deprecated
        public void restart()
        Deprecated.
        since 9.2 seems unused
      • start

        public void start()
      • instantiate

        public boolean instantiate()
        Instantiates corresponding component.

        Allows registering listeners on ComponentManager at component instantiation, before all components activation.

        Should be called before activate().

        Returns:
        false in case of error during instantiation, true otherwise.
        Since:
        11.3
      • activate

        public void activate()
      • deactivate

        public void deactivate()
      • deactivate

        public void deactivate​(boolean mustUnregisterExtensions)
        Deactivate the component. If mustUnregisterExtensions is false then the call was made by the manager because all components are stopped (and deactivated) so the extension unregister should not be done (this will speedup the stop and also fix broken component which are not correctly defining dependencies.)
        Since:
        9.2
      • resolve

        public void resolve()
      • unresolve

        public void unresolve()
      • isActivated

        public boolean isActivated()
        Description copied from interface: RegistrationInfo
        Checks whether this component is activated.
        Specified by:
        isActivated in interface RegistrationInfo
        Returns:
        true if the component is activated, false otherwise
      • isResolved

        public boolean isResolved()
        Description copied from interface: RegistrationInfo
        Checks whether this component is resolved (i.e. all its dependencies are satisfied).
        Specified by:
        isResolved in interface RegistrationInfo
        Returns:
        true if the component is resolved, false otherwise
      • getProvidedServiceNames

        public String[] getProvidedServiceNames()
        Description copied from interface: RegistrationInfo
        Gets the list of provided services or null if no service is provided.
        Specified by:
        getProvidedServiceNames in interface RegistrationInfo
        Returns:
        an array containing the service class names or null if no service are provided
      • checkExtensions

        protected Extension[] checkExtensions()
        Checks extensions and returns only valid ones.
        Since:
        11.3
      • getXmlFileUrl

        public URL getXmlFileUrl()
        Description copied from interface: RegistrationInfo
        Retrieve the URL of the XML file used to declare the component
        Specified by:
        getXmlFileUrl in interface RegistrationInfo
        Returns:
        the XML file URL
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object