com.atlassian.plugin.descriptors
Class UnloadableModuleDescriptor

java.lang.Object
  extended by com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
      extended by com.atlassian.plugin.descriptors.UnloadableModuleDescriptor
All Implemented Interfaces:
ModuleDescriptor<Void>, Resourced, StateAware

public final class UnloadableModuleDescriptor
extends AbstractModuleDescriptor<T>

Instances of this class represent a module which could not be loaded, not a module which can be unloaded.


Field Summary
 
Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources, singleton
 
Constructor Summary
UnloadableModuleDescriptor()
           
 
Method Summary
 String getErrorText()
           
 T getModule()
          The particular module object created by this plugin.
 boolean isEnabledByDefault()
          Whether or not this plugin module is enabled by default.
protected  void loadClass(Plugin plugin, org.dom4j.Element element)
          Override this for module descriptors which don't expect to be able to load a class successfully
protected  void loadClass(Plugin plugin, String clazz)
          Loads the module class that this descriptor provides, and will not necessarily be the implementation class.
 void setErrorText(String errorText)
           
 void setKey(String key)
          Sets the key of the ModuleDescriptor This is theoretically bad, as the superclass and the interface doesn't define this method, but it's required to construct an module descriptor when we don't have the XML Element.
 void setName(String name)
          Sets the name of the ModuleDescriptor This is theoretically bad, as the superclass and the interface doesn't define this method, but it's required to construct an module descriptor when we don't have the XML 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, init, isSingleton, isSingletonByDefault, isSystemModule, provideValidationRules, satisfiesMinJavaVersion, setPlugin, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnloadableModuleDescriptor

public UnloadableModuleDescriptor()
Method Detail

loadClass

protected void loadClass(Plugin plugin,
                         org.dom4j.Element element)
                  throws PluginParseException
Description copied from class: AbstractModuleDescriptor
Override this for module descriptors which don't expect to be able to load a class successfully

Overrides:
loadClass in class AbstractModuleDescriptor<Void>
Throws:
PluginParseException

loadClass

protected void loadClass(Plugin plugin,
                         String clazz)
                  throws PluginParseException
Description copied from class: AbstractModuleDescriptor
Loads the module class that this descriptor provides, and will not necessarily be the implementation class. Override this for module descriptors whose type cannot be determined via generics.

Overrides:
loadClass in class AbstractModuleDescriptor<Void>
clazz - The module class name to load
Throws:
PluginParseException

getErrorText

public final String getErrorText()

setErrorText

public final void setErrorText(String errorText)

getModule

public final T getModule()
Description copied from interface: ModuleDescriptor
The particular module object created by this plugin.

Specified by:
getModule in interface ModuleDescriptor<T>
Specified by:
getModule in class AbstractModuleDescriptor<T>
Returns:
The module object created by this plugin.
See Also:
ModuleDescriptor.getModuleClass()

isEnabledByDefault

public final boolean isEnabledByDefault()
Description copied from interface: ModuleDescriptor
Whether or not this plugin module is enabled by default.

Specified by:
isEnabledByDefault in interface ModuleDescriptor<T>
Overrides:
isEnabledByDefault in class AbstractModuleDescriptor<T>
Returns:
true if this plugin module is enabled by default.

setKey

public final void setKey(String key)
Sets the key of the ModuleDescriptor This is theoretically bad, as the superclass and the interface doesn't define this method, but it's required to construct an module descriptor when we don't have the XML Element.

Parameters:
key - the key of the ModuleDescriptor

setName

public final void setName(String name)
Sets the name of the ModuleDescriptor This is theoretically bad, as the superclass and the interface doesn't define this method, but it's required to construct an module descriptor when we don't have the XML Element.

Parameters:
name - the name of the ModuleDescriptor


Copyright © 2015 Atlassian. All rights reserved.