Class DeviceTypeRendererComponentModuleDescriptor

  • All Implemented Interfaces:
    com.atlassian.plugin.ModuleDescriptor<Renderer>, com.atlassian.plugin.Resourced, com.atlassian.plugin.ScopeAware, com.atlassian.plugin.StateAware

    public class DeviceTypeRendererComponentModuleDescriptor
    extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Renderer>
    A module descriptor for Renderer components which associates an existing Spring configured Renderer implementation with a particular device type. See ConversionContext.getOutputDeviceType() for more information about device types.

    The key attribute on the descriptor identifies the name of the Renderer component in the context. The device-type element can occur multiple times.

    Note that this ModuleDescriptor will not create instances of the module but instead will retrieve the named instance from the Spring context in which it exists.

    The purpose of this module is to allow plugins to define new Renderer for new output device types. For example, the Confluence Mobile plugin may want to register a mobile specific Renderer.

    • Field Summary

      • Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor

        key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Set<String> getDeviceTypes()  
      Renderer getModule()
      Retrieve the named bean from Spring.
      void init​(@NonNull com.atlassian.plugin.Plugin plugin, @NonNull org.dom4j.Element element)  
      • Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor

        assertModuleClassImplements, checkPermissions, destroy, disabled, enabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceLocation, getScopeKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSystemModule, loadClass, provideValidationRules, satisfiesMinJavaVersion, setBroken, setPlugin, toString
      • Methods inherited from interface com.atlassian.plugin.ModuleDescriptor

        getDisplayName
    • Constructor Detail

      • DeviceTypeRendererComponentModuleDescriptor

        public DeviceTypeRendererComponentModuleDescriptor​(com.atlassian.plugin.module.ModuleFactory moduleFactory)
    • Method Detail

      • init

        public void init​(@NonNull com.atlassian.plugin.Plugin plugin,
                         @NonNull org.dom4j.Element element)
                  throws com.atlassian.plugin.PluginParseException
        Specified by:
        init in interface com.atlassian.plugin.ModuleDescriptor<Renderer>
        Overrides:
        init in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Renderer>
        Throws:
        com.atlassian.plugin.PluginParseException
      • getModule

        public Renderer getModule()
        Retrieve the named bean from Spring.
        Specified by:
        getModule in interface com.atlassian.plugin.ModuleDescriptor<Renderer>
        Specified by:
        getModule in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Renderer>
        Returns:
        the renderer bean named from Spring.
        Throws:
        ClassCastException - if the bean identified by the key attribute is not of class Renderer.
      • getDeviceTypes

        public Set<String> getDeviceTypes()