Package org.ametys.runtime.servlet
Class RuntimeConfig
java.lang.Object
org.ametys.runtime.servlet.RuntimeConfig
Java representation of the WEB-INF/param/runtime.xml file.
Contains all runtime configuration values.
Contains all runtime configuration values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
configure
(Configuration runtimeConf, Configuration externalConf, File ametysHome, String contextPath) Configures the Runtime kernel.
This method must be called before getting the RuntimConfig instance.
Warning : the implementation allows this method to be called twice or more.Returns the Ametys home directory.Returns the application build date, if provided.Returns the application version nameReturns a Map<role, component id> containing the choosen implementation for the given component roleReturns the name of the default workspace.Returns a Collection containing the names of the excluded (deactivated) featuresReturns a Collection containing the names of the excluded (deactivated) pluginsReturns a Collection containing the names of the excluded (deactivated) workspacesReturns the absolute external location of the kernel, if any.
Returns null if the kernel is not externalized.Returns the declared external plugins (ie.Returns the declared external workspaces (ie.Returns the name of the class to be excuted at the end of the initialization process, if any.
May be null.static RuntimeConfig
Returns the shared instance of theRuntimeConfig
Return a Map association a workspace name and its associated themeReturns a Collection containing the locations of the pluginsstatic boolean
Returns true if the Runtime has been configured (ie.boolean
Returns true if safe mode is needed (ie.
-
Method Details
-
getInstance
Returns the shared instance of theRuntimeConfig
- Returns:
- the shared instance of the
RuntimeConfig
-
isConfigured
Returns true if the Runtime has been configured (ie. if theconfigure(Configuration, Configuration, File, String)
method has been called.- Returns:
- true if the Runtime has been configured.
-
configure
public static void configure(Configuration runtimeConf, Configuration externalConf, File ametysHome, String contextPath) Configures the Runtime kernel.
This method must be called before getting the RuntimConfig instance.
Warning : the implementation allows this method to be called twice or more. This is only to allow the Runtime to be re-started dynamically.
Be aware that this can cause the application to become unstable.- Parameters:
runtimeConf
- the Configuration of the Runtime kernel (ie the contents of the WEB-INF/param/runtime.xml file)externalConf
- the Configuration of external locations (ie the contents of the WEB-INF/param/external-locations.xml file)ametysHome
- The ametys home directorycontextPath
- the application context path
-
isInvalid
Returns true if safe mode is needed (ie. if there's been an error reading runtime.xml).- Returns:
- true if safe mode is needed.
-
getDefaultWorkspace
Returns the name of the default workspace. Null if none.- Returns:
- the name of the default workspace
-
getInitClassName
Returns the name of the class to be excuted at the end of the initialization process, if any.
May be null.- Returns:
- Returns the name of the class to be excuted at the end of the initialization process, if any
-
getPluginsLocations
Returns a Collection containing the locations of the plugins- Returns:
- a Collection containing the locations of the plugins
-
getExternalPlugins
Returns the declared external plugins (ie. not located in the webapp context).- Returns:
- the declared external plugins
-
getExternalWorkspaces
Returns the declared external workspaces (ie. not located in the webapp context).- Returns:
- the declared external workspaces
-
getExternalKernel
Returns the absolute external location of the kernel, if any.
Returns null if the kernel is not externalized.- Returns:
- the absolute external location of the kernel, if any.
-
getExcludedPlugins
Returns a Collection containing the names of the excluded (deactivated) plugins- Returns:
- a Collection containing the names of the excluded (deactivated) plugins
-
getExcludedFeatures
Returns a Collection containing the names of the excluded (deactivated) features- Returns:
- a Collection containing the names of the excluded (deactivated) features
-
getExcludedWorkspaces
Returns a Collection containing the names of the excluded (deactivated) workspaces- Returns:
- a Collection containing the names of the excluded (deactivated) workspaces
-
getOverridenThemes
Return a Map association a workspace name and its associated theme- Returns:
- a Map association a workspace name and its associated theme
-
getComponents
Returns a Map<role, component id> containing the choosen implementation for the given component role- Returns:
- a Map<role, component id> containing the choosen implementation for the given component role
-
getApplicationVersion
Returns the application version name- Returns:
- the application version name
-
getApplicationBuildDate
Returns the application build date, if provided. May be null.- Returns:
- the application build date.
-
getAmetysHome
Returns the Ametys home directory. Cannot be null.- Returns:
- The Ametys home directory.
-