Feature #2567

Feature #2158: Allow better control of file-based configuration

Configurable list of configuration files [Java]

Added by J. Moringen over 8 years ago. Updated about 8 years ago.

Status:ResolvedStart date:06/17/2016
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:Java
Target version:rsb-0.15

Associated revisions

Revision 0e8638e8
Added by J. Moringen about 8 years ago

Configurable configuration file list in rsb-java/src/main/java/rsb/util/ConfigLoader.java

fixes #2567

  • rsb-java/src/main/java/rsb/util/ConfigLoader.java
    (ConfigLoader::CONFIG_FILES_VARIABLE): new constant; name of the
    environment variable that can be used to specify an alternate list of
    configuration files
    (ConfigLoader::CONFIG_FILE_KEY_SYSTEM): new constant; placeholder
    indicating the system-wide configuration file
    (ConfigLoader::CONFIG_FILE_KEY_PREFIX): similar for prefix
    (ConfigLoader::CONFIG_FILE_KEY_USER): similar for user
    (ConfigLoader::CONFIG_FILE_KEY_PWD): similar for current directory
    (ConfigLoader::DEFAULT_CONFIG_FILES): new constant; default config
    file cascades
    (ConfigLoader::ConfigLoader): compute config file cascades
    (ConfigLoader::computeConfigfileCascade): new method; compute config
    file cascade, taking into account CONFIG_FILES_VARIABLE
    (ConfigLoader::loadFiles): use configFileCascade
    (ConfigLoader::resolveAndLoadFile): new method; interpret config file
    placeholders, then call loadFileIfAvailable
    (ConfigLoader::loadFileIfAvailable): accept a description and print it
    in debug output
  • rsb-java/src/test/java/rsb/Utilities.java
    (Utilities.createParticipantConfig): supply description to
    ConfigLoader.loadFileIfAvailable

History

#1 Updated by J. Moringen about 8 years ago

  • Status changed from New to In Progress
  • Assignee set to J. Moringen

#2 Updated by J. Moringen about 8 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF