Changes between Version 9 and Version 10 of Grits_ProjectPreferenceStore


Ignore:
Timestamp:
03/08/2017 08:30:02 PM (5 years ago)
Author:
shan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Grits_ProjectPreferenceStore

    v9 v10  
    992. Currently preference values are stored as string in the preference file. Each time  a preference is read, a generic ''PreferenceEntity'' object is created by ''GritsPreference'' store. This ''PreferenceEntity'' object is later converted to more specific preference object for getting preference values. ''ProjectPreferenceStore'' reduces multiple unnecessary de-serialization of preference values from strings stored in file. [[BR]]For example, if there were four tasks, ''ProjectPreferenceStore'' would cache a list of four tasks (along with its default information) which would be otherwise each time read as string from file, unmarshalled to PreferenceEntity object and then converted to list of tasks.
    1010
    11 These advantages are general for any similar local preference store in GRITS. Plugins that would be using preferences are recommended to maintain a local preference store.
     11These advantages are general for any similar local preference store in GRITS. Plugins that would use preferences are recommended to maintain a local preference store.
    1212
    1313== Implementation ==
    14 ''ProjectPreferenceStore'' works with enums and string. It takes enums as parameters and returns values in enums (single/multi-choice list).
     14''ProjectPreferenceStore'' works with enums and string. It takes enums as parameters and returns values in enums (that contain single/multi-choice list).
    1515
    1616
    17 === Class Diagram for various Preferences in Project Preference store ===
     17=== Preferences in Project Preference store ===
    1818[[BR]]
    1919[[Image(project_preference_store.jpg, 800)]]
     20Class diagram for project preferences
    2021[[BR]]
    2122
     
    3031- ''ParameterizedPreference'' - Types of preference whose values are a '''list of particular class object'''.
    3132
    32 - ''IntegerPreference'' - A special case of ''ParameterizedPreference'' whose values are a '''list of integers'''.
     33- ''IntegerPreference'' - A special case of ''ParameterizedPreference'' whose values are a '''list of integer'''.
    3334
    34 By using the above enum objects as parameter, the need of knowing preference variable names or the need of knowing filename for default values (when a preference is not found in the preference file) is removed. When one of the above enum is passed as parameter then user can get a generic SingleChoicePreference or MultiChoicePreference (or its special case MultiChoiceInteger) enum object.
     35By using the above enum objects as parameter, the need of knowing the preference variable name or the need of knowing filename for default values (when a preference is not found in the preference file) is removed. When one of the above enum is passed as a parameter then user can get a generic SingleChoicePreference or MultiChoicePreference (or its special case MultiChoiceInteger) enum object.
    3536
    36 A ''SingleChoicePreference'' is characterized by - a list of values and one default value.
     37A ''SingleChoicePreference'' is characterized by - a list of values and one default value (currently it only supports string values)
    3738
    3839A ''MultiChoicePreference'' is characterized by - a list of selected values and a list of unselected values.
     
    4546[[BR]]
    4647[[Image(project_preference_all.png, 1300)]]
     48Class diagram for project preference store
    4749[[BR]]
    4850