1 package com.atlassian.plugin.parsers;
2
3 import com.atlassian.plugin.Application;
4 import com.atlassian.plugin.PluginParseException;
5
6 import java.io.InputStream;
7 import java.util.Set;
8
9 /**
10 * Creates XML descriptor parser instances.
11 *
12 * @see XmlDescriptorParser
13 * @see DescriptorParserFactory
14 */
15 public class XmlDescriptorParserFactory implements DescriptorParserFactory
16 {
17 /**
18 *
19 * @param source the stream of data which represents the descriptor. The stream will
20 * only be read once, so it need not be resettable.
21 * @param applications the identifier of the current application to use to match modules, if specified. Null to
22 * match only modules with no application key.
23 * @return
24 * @throws PluginParseException
25 */
26 public DescriptorParser getInstance(InputStream source, Set<Application> applications) throws PluginParseException
27 {
28 return new XmlDescriptorParser(source, applications);
29 }
30 }