1 package com.atlassian.plugin;
2
3 import com.atlassian.annotations.ExperimentalApi;
4 import com.atlassian.plugin.event.NotificationException;
5
6 /**
7 * Augments the life-cycle of the plugin system with the ability to split {@link PluginSystemLifecycle#init()} for two phase
8 * startup.
9 *
10 * @since 3.2.0
11 */
12 @ExperimentalApi
13 public interface SplitStartupPluginSystemLifecycle extends PluginSystemLifecycle
14 {
15 /**
16 * Perform the first part of startup.
17 *
18 * This initializes the plugin system, and installs and enables early plugins.
19 *
20 * @throws PluginParseException If parsing the plugins failed.
21 * @throws IllegalStateException if already initialized or already in the process of initialization.
22 * @throws NotificationException If any of the Event Listeners throw an exception on the Framework startup events.
23 * @see PluginSystemLifecycle#init
24 */
25 void earlyStartup() throws PluginParseException, NotificationException;
26
27 /**
28 * Perform the second part of startup.
29 *
30 * This installs and enables late plugins, and performs any final validation steps. This may
31 * only be called after {@link #earlyStartup}, and calling both earlyStartup and lateStartup is
32 * equivalent to calling {@link PluginSystemLifecycle#init()}.
33 *
34 * @throws PluginParseException If parsing the plugins failed.
35 * @throws IllegalStateException if already initialized or already in the process of initialization.
36 * @throws NotificationException If any of the Event Listeners throw an exception on the Framework startup events.
37 * @see PluginSystemLifecycle#init
38 */
39 void lateStartup() throws PluginParseException, NotificationException;
40 }