1 package com.atlassian.plugin.manager;
2
3 import com.atlassian.annotations.PublicSpi;
4 import com.atlassian.plugin.ModuleDescriptor;
5
6 import java.util.Set;
7
8 import static java.util.Collections.emptySet;
9
10 /**
11 * Allows to extract the plugin keys defined by 'applications' built on top of a 'product'
12 * This component should be overridden by the host product (if it supports the concept of 'applications')
13 * For example: For the 'JIRA' product, we have applications such as 'JIRA Service Desk', 'JIRA Software', etc.
14 * {@code com.atlassian.application.api.ApplicationManager})
15 */
16 @PublicSpi
17 public interface ApplicationDefinedPluginsProvider {
18 /**
19 * Default implementation of application defined plugins provider
20 * Allows to omit all the checks for application defined descriptors
21 */
22 ApplicationDefinedPluginsProvider NO_APPLICATION_PLUGINS = descriptors -> emptySet();
23 /**
24 * This method extracts the set of plugin keys from the list of module descriptors
25 *
26 * @param descriptors list of module descriptors available in the system
27 * @return set of the plugin keys that are related to the applications
28 */
29 Set<String> getPluginKeys(Iterable<ModuleDescriptor> descriptors);
30 }