Class DefaultComponent

    • Field Detail

      • name

        protected String name
        Since:
        10.3
      • lastModified

        protected Long lastModified
        Since:
        5.6
    • Constructor Detail

      • DefaultComponent

        public DefaultComponent()
    • Method Detail

      • setName

        public void setName​(String name)
        Description copied from interface: Component
        Sets the name for this component, as it was defined in its XML.

        This is called once after construction by the runtime framework.

        Specified by:
        setName in interface Component
        Parameters:
        name - the name
      • activate

        public void activate​(ComponentContext context)
        Description copied from interface: Component
        Activates the component.

        This method is called by the runtime when a component is activated.

        Specified by:
        activate in interface Component
        Parameters:
        context - the runtime context
      • deactivate

        public void deactivate​(ComponentContext context)
        Description copied from interface: Component
        Deactivates the component.

        This method is called by the runtime when a component is deactivated.

        Specified by:
        deactivate in interface Component
        Parameters:
        context - the runtime context
      • registerExtension

        public void registerExtension​(Extension extension)
        Description copied from interface: Extensible
        Registers the given extension.
        Specified by:
        registerExtension in interface Extensible
        Parameters:
        extension - the extension to register
      • unregisterExtension

        public void unregisterExtension​(Extension extension)
        Description copied from interface: Extensible
        Unregisters the given extension.
        Specified by:
        unregisterExtension in interface Extensible
        Parameters:
        extension - the extension to unregister
      • getAdapter

        public <T> T getAdapter​(Class<T> adapter)
        Description copied from interface: Adaptable
        Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.
        Specified by:
        getAdapter in interface Adaptable
        Parameters:
        adapter - the adapter class to look up
        Returns:
        a object castable to the given class, or null if this object does not have an adapter for the given class
      • start

        public void start​(ComponentContext context)
        Description copied from interface: Component
        Start the component. This method is called after all the components were resolved and activated
        Specified by:
        start in interface Component
      • setModifiedNow

        protected void setModifiedNow()
        Sets the last modified date to current date timestamp
        Since:
        5.6
      • register

        protected boolean register​(String xp,
                                   Descriptor descriptor)
        Since:
        10.3
      • unregister

        protected boolean unregister​(String xp,
                                     Descriptor descriptor)
        Since:
        10.3
      • getDescriptors

        protected <T extends DescriptorList<T> getDescriptors​(String xp)
        Since:
        10.3