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 * @param source the stream of data which represents the descriptor. The stream will
18 * only be read once, so it need not be resettable.
19 * @param applications the identifier of the current application to use to match modules, if specified. Null to
20 * match only modules with no application key.
21 * @return
22 * @throws PluginParseException
23 */
24 public DescriptorParser getInstance(InputStream source, Set<Application> applications) throws PluginParseException {
25 return new XmlDescriptorParser(source, applications);
26 }
27 }