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 * Creates a new {@link DescriptorParser} for getting plugin descriptor information
17 * from the provided source data and supplemental module descriptors.
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 supplementalSources streams of data representing supplemental plugin information
22 * @param applications The list of application keys to match for module descriptors
23 * @return an instance of the descriptor parser tied to this InputStream
24 * @throws com.atlassian.plugin.PluginParseException if there was a problem creating the descriptor parser
25 * due to an invalid source stream.
26 * @since 3.2.15
27 */
28 DescriptorParser getInstance(InputStream source, Iterable<InputStream> supplementalSources,
29 Set<Application> applications) throws PluginParseException;
30 }