Package com.atlassian.confluence.setup
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 theFinishSetupAction
.
-
-
Constructor Summary
Constructors Constructor Description SetupContext()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
destroy()
Dispose of the setup context.static org.springframework.context.ConfigurableApplicationContext
get()
Retrieve the setup contextstatic void
init(javax.servlet.ServletContext servletContext)
Initialise the setup context.static boolean
isAvailable()
Determine if the setup context is available
-
-
-
Method Detail
-
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.
-
-