public final class RuntimeConfig extends Object
Modifier and Type | Field and Description |
---|---|
private static RuntimeConfig |
__config |
private File |
_ametysHome |
private Date |
_buildDate |
private Map<String,String> |
_components |
private String |
_contextPath |
private String |
_defaultWorkspace |
private Collection<String> |
_excludedFeatures |
private Collection<String> |
_excludedPlugins |
private Collection<String> |
_excludedWorkspaces |
private File |
_externalKernel |
private Map<String,File> |
_externalPlugins |
private Map<String,File> |
_externalWorkspaces |
private String |
_initClass |
private Logger |
_logger |
private Map<String,String> |
_overridenThemes |
private Collection<String> |
_pluginsLocations |
private boolean |
_safeMode |
private String |
_version |
Modifier | Constructor and Description |
---|---|
private |
RuntimeConfig() |
Modifier and Type | Method and Description |
---|---|
private void |
_configureApplication(Configuration config) |
private void |
_configureComponents(Configuration config) |
private void |
_configureExternal(Configuration config) |
private void |
_configurePlugins(Configuration config) |
private void |
_configureWorkspaces(Configuration config) |
private File |
_getFile(String path) |
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. |
File |
getAmetysHome()
Returns the Ametys home directory.
|
Date |
getApplicationBuildDate()
Returns the application build date, if provided.
|
String |
getApplicationVersion()
Returns the application version name
|
Map<String,String> |
getComponents()
Returns a Map<role, component id> containing the choosen implementation for the given component role
|
String |
getDefaultWorkspace()
Returns the name of the default workspace.
|
Collection<String> |
getExcludedFeatures()
Returns a Collection containing the names of the excluded (deactivated) features
|
Collection<String> |
getExcludedPlugins()
Returns a Collection containing the names of the excluded (deactivated) plugins
|
Collection<String> |
getExcludedWorkspaces()
Returns a Collection containing the names of the excluded (deactivated) workspaces
|
File |
getExternalKernel()
Returns the absolute external location of the kernel, if any.
Returns null if the kernel is not externalized. |
Map<String,File> |
getExternalPlugins()
Returns the declared external plugins (ie.
|
Map<String,File> |
getExternalWorkspaces()
Returns the declared external workspaces (ie.
|
String |
getInitClassName()
Returns the name of the class to be excuted at the end of the initialization process, if any.
May be null. |
static RuntimeConfig |
getInstance()
Returns the shared instance of the
RuntimeConfig |
Map<String,String> |
getOverridenThemes()
Return a Map association a workspace name and its associated theme
|
Collection<String> |
getPluginsLocations()
Returns a Collection containing the locations of the plugins
|
static boolean |
isConfigured()
Returns true if the Runtime has been configured (ie.
|
boolean |
isSafeMode()
Returns true if safe mode is needed (ie.
|
private static RuntimeConfig __config
private boolean _safeMode
private String _defaultWorkspace
private String _initClass
private final Collection<String> _pluginsLocations
private final Collection<String> _excludedPlugins
private final Collection<String> _excludedFeatures
private final Collection<String> _excludedWorkspaces
private final Map<String,String> _overridenThemes
private final Map<String,String> _components
private String _contextPath
private Date _buildDate
private File _externalKernel
private Map<String,File> _externalPlugins
private Map<String,File> _externalWorkspaces
private File _ametysHome
private RuntimeConfig()
public static RuntimeConfig getInstance()
RuntimeConfig
RuntimeConfig
public static boolean isConfigured()
configure(Configuration, Configuration, File, String)
method has been called.public static void configure(Configuration runtimeConf, Configuration externalConf, File ametysHome, String contextPath)
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 pathprivate void _configureWorkspaces(Configuration config)
private void _configurePlugins(Configuration config)
private void _configureComponents(Configuration config)
private void _configureApplication(Configuration config)
private void _configureExternal(Configuration config)
public boolean isSafeMode()
public String getDefaultWorkspace()
public String getInitClassName()
public Collection<String> getPluginsLocations()
public Map<String,File> getExternalPlugins()
public Map<String,File> getExternalWorkspaces()
public File getExternalKernel()
public Collection<String> getExcludedPlugins()
public Collection<String> getExcludedFeatures()
public Collection<String> getExcludedWorkspaces()
public Map<String,String> getOverridenThemes()
public Map<String,String> getComponents()
public String getApplicationVersion()
public Date getApplicationBuildDate()
public File getAmetysHome()