View Javadoc

1   package com.atlassian.plugin.descriptors;
2   
3   import com.atlassian.plugin.Plugin;
4   import com.atlassian.plugin.PluginParseException;
5   import com.atlassian.plugin.Resources;
6   import com.atlassian.plugin.elements.ResourceDescriptor;
7   
8   import org.dom4j.Element;
9   
10  import java.util.Collections;
11  
12  public final class UnrecognisedModuleDescriptor extends AbstractModuleDescriptor<Void>
13  {
14      private String errorText;
15  
16      @Override
17      public Void getModule()
18      {
19          return null;
20      }
21  
22      @Override
23      public boolean isEnabledByDefault()
24      {
25          //never enable a UnrecognisedModuleDescriptor
26          return false;
27      }
28  
29      public String getErrorText()
30      {
31          return errorText;
32      }
33  
34      public void setErrorText(final String errorText)
35      {
36          this.errorText = errorText;
37      }
38  
39      /**
40       * Sets the key of the ModuleDescriptor
41       *
42       * This is theoretically bad, as the superclass and the interface doesn't define this method,
43       * but it's required to construct an UnrecognisedModuleDescriptor when we don't have the XML Element.
44       *
45       * @param key the key of the ModuleDescriptor
46       */
47      public void setKey(final String key)
48      {
49          this.key = key;
50      }
51  
52      /**
53       * Sets the name of the ModuleDescriptor
54       *
55       * This is theoretically bad, as the superclass and the interface doesn't define this method,
56       * but it's required to construct an UnrecognisedModuleDescriptor when we don't have the XML Element.
57       *
58       * @param name the name of the ModuleDescriptor
59       */
60      public void setName(final String name)
61      {
62          this.name = name;
63      }
64  }