1 package com.atlassian.plugin.metadata;
2
3 import com.atlassian.plugin.ModuleDescriptor;
4 import com.atlassian.plugin.Plugin;
5 import com.google.common.base.Supplier;
6
7 /**
8 * Describes whether plugins are required or provided by the host application.
9 *
10 * @since 2.6
11 */
12 interface PluginMetadata
13 {
14 /**
15 * Is the {@link Plugin} provided by (bundled with) the application.
16 *
17 * @param plugin the plugin
18 * @return true if the application bundled the plugin.
19 */
20 boolean applicationProvided(Plugin plugin);
21
22 /**
23 * Is the {@link Plugin} required by the application for basic operation.
24 *
25 * @param plugin the plugin
26 * @return true if the application requires the plugin.
27 */
28 boolean required(Plugin plugin);
29
30 /**
31 * Is the {@link ModuleDescriptor} required by the application for basic
32 * operation.
33 *
34 * @param descriptor the module descriptor
35 * @return true if the application requires the module descriptor.
36 */
37 boolean required(ModuleDescriptor<?> descriptor);
38
39 }