Class Configuration
Configurations are retrieved from three locations: properties set at runtime with setString(String, String),
system properties and a default properties file named basecode.properties at the root of the classpath in
that order.
Properties set via system properties must be prefixed with basecode. to be considered.
Properties set at runtime can be reset with reset() and reset(String).
Ported in-tree from ubic.basecode.util.Configuration (baseCode 1.1.34-RENOVATIONS) as the final
step in retiring the baseCode Maven dependency. The system-property prefix and the
basecode.properties classpath resource name are preserved verbatim for backward compatibility with
existing configuration files and BaseCodeConfigurer.
- Author:
- paul
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BooleangetBoolean(String key) Obtain a boolean configuration value by key.static StringObtain a configuration value by key.static voidreset()Reset all configurations set at runtime.static voidReset a specific configuration by key.static voidSet a configuration by key.
-
Constructor Details
-
Configuration
public Configuration()
-
-
Method Details
-
getString
Obtain a configuration value by key.Resolution order: runtime overrides set via
setString(String, String), then JVM system properties (preferring thebasecode.-prefixed form for backward compatibility, falling back to the bare key), then defaults from thebasecode.propertiesclasspath resource. The bare-key fallback exists so that-Dload.chebiOntology=trueworks without forcing callers to remember the legacy prefix; the prefixed form is still consulted first, so existing deployments are unaffected. -
getBoolean
-
setString
-
reset
public static void reset()Reset all configurations set at runtime. -
reset
Reset a specific configuration by key.
-