Class SetupContext

java.lang.Object
com.atlassian.confluence.setup.SetupContext

public class SetupContext extends Object
Static holder for setup Spring context. The setup context provides the services necessary to configure Confluence before a database connection is available.

The setup context is loaded by the ConfluenceConfigurationListener only if setup is required, and is destroyed by the FinishSetupAction.

  • Constructor Details

    • SetupContext

      public SetupContext()
  • Method Details

    • init

      public static void init(javax.servlet.ServletContext servletContext)
      Initialise the setup context.
      Parameters:
      servletContext - the servlet context in which the application is being set up
      Throws:
      IllegalStateException - if the setup context has already been initialised
    • isAvailable

      public static boolean isAvailable()
      Determine if the setup context is available
      Returns:
      true if the setup context is available
    • get

      public static org.springframework.context.ConfigurableApplicationContext get()
      Retrieve the setup context
      Returns:
      the currently configured setup context, or null if no context has been configured.
    • destroy

      public static void destroy()
      Dispose of the setup context. If no context is configured, nothing happens.
    • isInitializationDisabled

      public static boolean isInitializationDisabled()
      If SetupContext initialization disabled
    • disableInitialization

      public static void disableInitialization()
      Disable SetupContext initialization