Class MediaItemComponentTypeImpl

  • All Implemented Interfaces:
    DelegatedControllerAware, Component, ComponentType, MediaItemComponentType

    public final class MediaItemComponentTypeImpl
    extends ComponentTypeBase
    implements MediaItemComponentType
    This class provides a componentType implementation for GX Webmanager media items. NOTE: media types are identified by their content type (provided by the @ContentType annotation. So if the value of this annotation is changed in an update of the WCB the framework will not identify the WCB as already installed WCB but will create a new content type for it. Therefore the value of the @ContentType annotation may only be changed after an purgeContent and uninstall of the WCB.
    • Constructor Detail

      • MediaItemComponentTypeImpl

        public MediaItemComponentTypeImpl()
    • Method Detail

      • setAsAvailableContentType

        public void setAsAvailableContentType​(MediaItemComponentDefinition mediaCompDef)
        Appends this media component as available content type among all webinitiatifs. This effective checks the content type in the "Active content types" section of the Channel Configuration panel
        Specified by:
        setAsAvailableContentType in interface MediaItemComponentType
        Parameters:
        mediaCompDef - The media item component definition to activate
      • setAsAvailableContentType

        public void setAsAvailableContentType​(MediaItemComponentDefinition mediaCompDef,
                                              int webId,
                                              boolean available)
        Appends this media component as available content type on the specified webinitiatif. This effective checks the content type in the "Active content types" section of the Channel Configuration panel on that webinitiatif.
        Specified by:
        setAsAvailableContentType in interface MediaItemComponentType
        Parameters:
        mediaCompDef - The media item component definition to activate
        webId - The id of the website to enable to content type on
        available - If true, the contenttype is added as available, if false, it is removed
      • installComponent

        public boolean installComponent​(ComponentDefinition componentDefinition)
        Description copied from interface: ComponentType
        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.
        Specified by:
        installComponent in interface ComponentType
        Overrides:
        installComponent in class ComponentTypeBase
        Parameters:
        componentDefinition - Definition of the component that is to be installed
        Returns:
        true if the component was successfully installed
      • purgeComponent

        public boolean purgeComponent​(ComponentDefinition componentDefinition)
        Description copied from interface: ComponentType
        Deletes the content created by instances of the component type.
        Specified by:
        purgeComponent in interface ComponentType
        Overrides:
        purgeComponent in class ComponentTypeBase
        Parameters:
        componentDefinition - Definition of the component that is to be purged
        Returns:
        true if the component was successfully purged
      • uninstallComponent

        public boolean uninstallComponent​(ComponentDefinition componentDefinition)
        Description copied from interface: ComponentType
        Uninstalls a component. Uninstalling means all files and objects instantiated by the component's definition are deleted.
        Specified by:
        uninstallComponent in interface ComponentType
        Overrides:
        uninstallComponent in class ComponentTypeBase
        Parameters:
        componentDefinition - Definition of the component that is to be uninstalled
        Returns:
        true if the component was successfully uninstalled
      • getComponentInterface

        public String getComponentInterface()
        Description copied from interface: ComponentType
        Return the component interface this componentType provides.
        Specified by:
        getComponentInterface in interface ComponentType
        Returns:
        identifier for provided type
      • getComponentTypeInterface

        public String getComponentTypeInterface()
        Description copied from interface: ComponentType
        Returns the componentType interface this componentType publishes.
        Specified by:
        getComponentTypeInterface in interface ComponentType
        Returns:
        identifier for provided type