Changes between Version 2 and Version 3 of PLUGIN_SUPPORT_LIB_CONFIGURING_R1


Ignore:
Timestamp:
06/04/09 17:31:40 (16 years ago)
Author:
mitex
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TabularUnified PLUGIN_SUPPORT_LIB_CONFIGURING_R1

    v2 v3  
    6363 
    6464= Design = 
    65  * Package {{{org.sophie2.base.config}}} 
     65 * Package {{{org.sophie2.base.config}}}. 
    6666 
    67  * Immutable generic class {{{ConfigKey}}} that encapsulates all of the information about a key: 
    68   * key name - String 
     67 * Immutable generic class {{{ConfigKey<T>}}} that encapsulates all of the information about a key: 
     68  * name (of the key) - String 
    6969  * configuration file - File 
    70   * default value (if the key is not present in the file) - Object 
     70  * default value (if the key is not present in the file) - T 
    7171  * schema (for the persistence) - String, for example "imm:int|storage|decimal" 
    7272 
    73  * Class {{{Configuration}}}  
     73 * Class {{{ConfigEntry}}} that extends {{{ListEntry}}} 
     74  * This class represents a key-value pair in a configuration file. 
     75  * Override {{{getKey}}} to return a {{{ConfigKey}}}. 
     76 
     77 * Class {{{Configuration}}} - represents a single configuration file. 
     78  * configuration file - File 
     79  * list of {{{ConfigEntry}}}s that stores all key-value pairs in that file. 
     80  * get......... returns the default value........ 
     81 
     82 * Class {{{ConfigurationPersister}}} that loads/saves configuration files. 
     83  * .......... 
     84  * Register the persister as an extension. 
     85 
     86 * Singleton class {{{ConfigurationManager}}}. 
     87  * {{{T get(ConfigKey<T> key)}}} 
     88   * Given the file name in the key, finds the corresponding Configuration and then returns the value for that key. 
     89  * {{{set(ConfigKey<T> key, T value)}}} 
     90   * Given the file name in the key, finds the corresponding Configuration. 
     91   * Sets the new value for that key. 
     92   * Saves the configuration using the persister. 
     93  * Map<String, Configuration>, which maps Configuration objects to configuration file names. 
    7494 
    7595= Implementation =