1 package com.atlassian.plugin.webresource;
2
3 import com.atlassian.plugin.descriptors.AbstractModuleDescriptor;
4 import com.atlassian.plugin.Plugin;
5 import com.atlassian.plugin.PluginParseException;
6 import org.dom4j.Element;
7
8 import java.util.List;
9 import java.util.ArrayList;
10
11
12
13
14
15
16 public class WebResourceModuleDescriptor extends AbstractModuleDescriptor<Void>
17 {
18 private List<String> dependencies = new ArrayList<String>();
19
20 @Override
21 public void init(final Plugin plugin, final Element element) throws PluginParseException
22 {
23 super.init(plugin, element);
24
25 @SuppressWarnings("unchecked")
26 List<Element> dependencyElements = element.elements("dependency");
27 for (Element dependency : dependencyElements)
28 {
29 dependencies.add(dependency.getTextTrim());
30 }
31 }
32
33
34
35
36 @Override
37 public Void getModule()
38 {
39 throw new UnsupportedOperationException("There is no module for Web Resources");
40 }
41
42
43
44
45
46 public List<String> getDependencies()
47 {
48 return dependencies;
49 }
50 }