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 * A factory which creates a DescriptorParserFactory by composing together multiple XML descriptors
11 *
12 * @since 3.2.16
13 */
14 public interface CompositeDescriptorParserFactory extends DescriptorParserFactory
15 {
16 /**
17 * Creates a new {@link DescriptorParser} for getting plugin descriptor information
18 * from the provided source data and supplemental module descriptors.
19 *
20 * @param source the stream of data which represents the descriptor. The stream will
21 * only be read once, so it need not be resettable.
22 * @param supplementalSources streams of data representing supplemental plugin information
23 * @param applications The list of application keys to match for module descriptors
24 * @return an instance of the descriptor parser tied to this InputStream
25 * @throws com.atlassian.plugin.PluginParseException if there was a problem creating the descriptor parser
26 * due to an invalid source stream.
27 * @since 3.2.15
28 */
29 DescriptorParser getInstance(InputStream source, Iterable<InputStream> supplementalSources, Set<Application> applications) throws PluginParseException;
30 }