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 void init(final Plugin plugin, final Element element) throws PluginParseException
24 {
25 key = element.attributeValue("key");
26 name = element.attributeValue("name");
27 description = element.elementTextTrim("description");
28
29 this.plugin = plugin;
30 resources = new Resources(Collections.<ResourceDescriptor> emptyList());
31 }
32
33 @Override
34 public boolean isEnabledByDefault()
35 {
36
37 return false;
38 }
39
40 public String getErrorText()
41 {
42 return errorText;
43 }
44
45 public void setErrorText(final String errorText)
46 {
47 this.errorText = errorText;
48 }
49
50
51
52
53
54
55
56
57
58 public void setKey(final String key)
59 {
60 this.key = key;
61 }
62
63
64
65
66
67
68
69
70
71 public void setName(final String name)
72 {
73 this.name = name;
74 }
75 }