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 import org.dom4j.Element;
8
9 import java.util.Collections;
10
11 public class UnrecognisedModuleDescriptor extends AbstractModuleDescriptor
12 {
13 private String errorText;
14
15 public Object getModule()
16 {
17 return null;
18 }
19
20 public void init(Plugin plugin, Element element) throws PluginParseException
21 {
22 this.key = element.attributeValue("key");
23 this.name = element.attributeValue("name");
24 this.description = element.elementTextTrim("description");
25
26 this.plugin = plugin;
27 this.resources = new Resources(Collections.<ResourceDescriptor>emptyList());
28 }
29
30 public boolean isEnabledByDefault()
31 {
32
33 return false;
34 }
35
36 public String getErrorText()
37 {
38 return errorText;
39 }
40
41 public void setErrorText(String errorText)
42 {
43 this.errorText = errorText;
44 }
45
46
47
48
49
50
51
52
53
54 public void setKey(String key)
55 {
56 this.key = key;
57 }
58
59
60
61
62
63
64
65
66
67 public void setName(String name)
68 {
69 this.name = name;
70 }
71 }