com.atlassian.confluence.plugin.descriptor
Class DeviceTypeRendererComponentModuleDescriptor

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<Renderer>
      extended by com.atlassian.confluence.plugin.descriptor.DeviceTypeRendererComponentModuleDescriptor
All Implemented Interfaces:
com.atlassian.plugin.ModuleDescriptor<Renderer>, com.atlassian.plugin.Resourced, 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, singleton
 
Constructor Summary
DeviceTypeRendererComponentModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory)
           
 
Method Summary
 java.util.Set<java.lang.String> getDeviceTypes()
           
 Renderer getModule()
          Retrieve the named bean from Spring.
 void init(com.atlassian.plugin.Plugin plugin, org.dom4j.Element element)
           
 
Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
assertModuleClassImplements, checkPermissions, destroy, destroy, disabled, enabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceDescriptors, getResourceLocation, hashCode, isEnabledByDefault, isSingleton, isSingletonByDefault, isSystemModule, loadClass, loadClass, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeviceTypeRendererComponentModuleDescriptor

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

init

public void init(@NotNull
                 com.atlassian.plugin.Plugin plugin,
                 @NotNull
                 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:
java.lang.ClassCastException - if the bean identified by the key attribute is not of class Renderer.

getDeviceTypes

public java.util.Set<java.lang.String> getDeviceTypes()


Copyright © 2003-2014 Atlassian. All Rights Reserved.