Changes between Version 17 and Version 18 of GROUP_RESOURCE_R0


Ignore:
Timestamp:
04/04/09 13:24:41 (16 years ago)
Author:
meddle
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUP_RESOURCE_R0

    v17 v18  
    9595 
    9696A resource is represented by the Resource class and the ResourceSpace class. The Resource class is more like a representation of the content of the resource and the ResourceSpace is what manages it's Resource and it's sub-objects which state is trackable. 
    97  * Resource 
    98   * A Resource can only be created with a ResourceSpace! 
    99   * All the Resources referred from a Resource are represented by ResourceRefs.  
    100   * All the sub-resources that are owned by a Resource (The Resource is their parent) are contained in the children list. It is possible to have outer resources refered from it but they are not in that children list. 
    101   * The resource name is unique for the level in the Resource's hierarchy it is. The siblings of the Resource in the Resource tree have to have different names. The name is 
    102 set from the ResourceSpace at the resource's creation. 
     97 * Resource : 
    10398  * The Resource's entity id is it's unique identifier, it can not be changed and it is generated and set by the ResourceSpace upon creation. It is used for searching in the ResourceLocalCache or on a outer location. 
    10499  * The resource location is absolute location of the resource, it can be: 
     
    112107  * The entity id and the location of a Resource are held in the ResourceSpace of the Resource. 
    113108  * All the ProObjects, which state is important for the state and the reconstruction of a Resource must be annotated with the annotation @Own 
     109  * A Resource can only be created with a ResourceSpace! 
     110  * All the Resources referred from a Resource are represented by ResourceRefs.  
     111  * All the sub-resources that are owned by a Resource (The Resource is their parent) are contained in the children list. It is possible to have outer resources refered from it but they are not in that children list. 
     112  * The resource name is unique for the level in the Resource's hierarchy it is. The siblings of the Resource in the Resource tree have to have different names. The name is set from the ResourceSpace at the resource's creation. 
     113 * ResourceSpace : 
     114  * It is responsible for the creation of a resource. Resource can be created in three ways: 
     115   * By it's class => In that case the Resource's name is generated by it's id and the Resource location is set in the temporary sophie 2 resource location with path the newly generated name. 
     116   * By it's class and name => In that case the Resource is created in the temporary sophie 2 resource location with the passed name. 
     117   * By it's class, passed name and Resource parent => in that case the resource is  nested in the parent. It's location is in the parent's location with path the passed name and the name is validated to be unique against it's siblings in the parent. 
     118  * The ResourceSpace keeps the location and the entity id of it's reosurce. 
     119  * The ResourceSpace gives unique ids for all the ProObjects in it (They are fields in it's Resource or are fields in such ProObjects). 
     120  * The ResourceSpace can get all the Resources in the tree of it's Resource 
     121  * The ResourceSpace is able to clone Resource -> in this case the Resource tree is copied and all the resources have new entity ids and their inner ResourceRefs are redirected in the tree. The outer ResourceRef are kept. 
     122  * The ResourceSpace is able to copy a Resource into another Resource, and that is the way to add a Resource to another location. 
     123  * Deleting resources will be designed and implemented in the next revision. 
     124 
     125The Resource and the ResourceSpace are unseparateble, they represent the sophie 2 resources and will be able to execute all the operations on a resource and to maintain it.[[BR]] 
     126[[BR]] 
     127[[BR]] 
     128 
    114129 
    115130= Implementation =