Changes between Version 2 and Version 3 of GROUP_MEM_RESOURCES_MODEL_R0


Ignore:
Timestamp:
07/29/09 17:44:04 (16 years ago)
Author:
mira
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUP_MEM_RESOURCES_MODEL_R0

    v2 v3  
    2828  
    2929= Design = 
     30Read the major design of [wiki: GROUP_RESOURCE_MODEL_REDESIGN_R0]. In this tasks design are explained only the unspecified things of the first.  
     31 
     32== ResourceModel == 
     33 
     34The model will be constructed by nodes that can either have value or children but not both. Once created the value of the node could not be changed. Every value node will hold the value of specific property that could be accessed only by the right key. The children nodes will hold maps of names and corresponding nodes so basically it is an immutable tree structure.[[BR]] [[BR]] 
     35The path in this tree structure will be going through nodes that correspond to parts of the keys id and getting a keys value is just finding the right value node and getting its value. For example if you are looking for the value of the border color of page A you should look in the tree nodes as follows : root(“”)->children->PageA->border->color. All nodes except the last one are children nodes and the last node will be value node with the ImmColor as its value.  [[BR]] [[BR]] 
     36Since all nodes have only final values the modifications on it will return new instances of the model with all modifications applied.  Furthermore it will be too heavy to apply every change on its own and copy the model every time so the modify method will take as argument a Map of keys to be changed and their new values.[[BR]] [[BR]] 
     37The model will need only correct changes so the ModelChangers should take care of producing some times more than one write so that would be easier for developers to write AutoActions. [[BR]] [[BR]] 
     38 
     39== Accesses == 
     40 
     41The mem and file accesses would have basically the same logic except that file accesses should present additional logic for persistence. For this abstracts common parent classes should be created: [[BR]] [[BR]] 
     42 
     43'''LocalRootAccess''' – keeps an list of all created accesses and when  asked to open looks in it for one at the given location. Provides abstract method createTop () to be implemented of the concrete Mem and File RootAccesses.  [[BR]] [[BR]] 
     44 
     45'''LocalTopAccess''' – Provide abstract methods createInner() to be implemented by the concrete Mem and File TopAccesses.  It does not memorize the created and creates new ones every time when opening an ref but since the inner accesses don`t have model.  [[BR]] [[BR]] 
     46 
     47'''LocalInnerAccess''' – Delegating logic to its top access.  [[BR]] [[BR]] 
     48There are tests for most of the functionality – [] 
    3049 
    3150