1 package com.atlassian.plugin.osgi.factory;
2
3 import com.atlassian.plugin.parsers.DescriptorParser;
4 import com.atlassian.plugin.parsers.DescriptorParserFactory;
5 import com.atlassian.plugin.PluginParseException;
6
7 import java.io.InputStream;
8
9 import org.apache.commons.lang.Validate;
10
11
12
13
14
15
16 public class OsgiPluginXmlDescriptorParserFactory implements DescriptorParserFactory
17 {
18
19
20
21
22
23
24 public DescriptorParser getInstance(InputStream source) throws PluginParseException
25 {
26 Validate.notNull(source, "The descriptor source must not be null");
27 return new OsgiPluginXmlDescriptorParser(source, "component", "component-import", "bean", "spring", "module-type");
28 }
29 }