Interface ComponentType

    • Method Detail

      • getComponentTypeInterface

        String getComponentTypeInterface()
        Returns the componentType interface this componentType publishes.
        Returns:
        identifier for provided type
      • getComponentInterface

        String getComponentInterface()
        Return the component interface this componentType provides.
        Returns:
        identifier for provided type
      • checkComponentDefinition

        boolean checkComponentDefinition​(ComponentDefinition componentDefinition)
        Check whether a componentDefinition is valid for this componentType.
        Parameters:
        componentDefinition - definition of a component that is validated
        Returns:
        a boolean value indicating whether the componentDefinition is valid
      • getComponent

        Component getComponent​(String id)
        Get a registered component by id.
        Parameters:
        id - Unique identifier representing the component
        Returns:
        an array of registered component for this componentType.
      • getComponents

        Component[] getComponents()
        Get an array of registered component for this componentType.
        Returns:
        an array of registered component for this componentType.
      • getComponentCount

        int getComponentCount()
        Get the number of registered components for this componentType.
        Returns:
        the number of registered component for this componentType.
      • installComponent

        boolean installComponent​(ComponentDefinition componentDefinition)
        Invoked when a component of this component type is installed. The component type implements installation logic that is applicable for all components of this type and then invokes onInstall to allow inherited component types to implement additional logic. The onInstall callback method is only invoked if the generic component installation logic was successful.
        Parameters:
        componentDefinition - Definition of the component that is to be installed
        Returns:
        true if the component was successfully installed
      • installComponent

        boolean installComponent​(ComponentDefinition componentDefinition,
                                 Component component)
        Installs a component of this component type. The component type implements installation logic that is applicable for all components of this type and then invokes onInstall to allow inherited component types to implement additional logic. The onInstall callback method is only invoked if the generic component installation logic was successful.
        Parameters:
        componentDefinition - Definition of the component that is to be installed
        component - Component that is to be installed
        Returns:
        true if the component was successfully installed
      • updateComponent

        boolean updateComponent​(ComponentDefinition componentDefinition)
        Updates a component.
        Parameters:
        componentDefinition - Definition of the component that is to be installed
        Returns:
        true if the component was successfully updated
      • purgeComponent

        boolean purgeComponent​(ComponentDefinition componentDefinition)
        Deletes the content created by instances of the component type.
        Parameters:
        componentDefinition - Definition of the component that is to be purged
        Returns:
        true if the component was successfully purged
      • uninstallComponent

        boolean uninstallComponent​(ComponentDefinition componentDefinition)
        Uninstalls a component. Uninstalling means all files and objects instantiated by the component's definition are deleted.
        Parameters:
        componentDefinition - Definition of the component that is to be uninstalled
        Returns:
        true if the component was successfully uninstalled
      • startComponent

        boolean startComponent​(Component component)
        Starts an installed component.
        Parameters:
        component - Component that should be started
        Returns:
        true if the component was successfully started
      • stopComponent

        boolean stopComponent​(Component component)
        Stops an installed component.
        Parameters:
        component - Component that should be stopped
        Returns:
        true if the component was successfully stopped
      • enableComponentForAllWebsites

        void enableComponentForAllWebsites​(ComponentDefinition componentDefinition)
        Enables a component for all websites.
        Parameters:
        componentDefinition - the ComponentDefinition of the component that is enabled
      • deployResources

        void deployResources​(ComponentDefinition componentDefinition)
        Deploys the necessary resources for a component. This should deploy all resources that are removed on a restart of an installation, for instance mediaitem icons.
        Parameters:
        componentDefinition - the ComponentDefinition of the component that is enabled