Changes between Version 21 and Version 22 of GROUP_RESOURCE_R0


Ignore:
Timestamp:
04/21/09 14:25:51 (16 years ago)
Author:
gogov
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GROUP_RESOURCE_R0

    v21 v22  
    6363   * This should update the status property 
    6464  * Getting resource location 
    65   * Resource getting it's parent 
    66   * Resource getting list of it's children 
     65  * Resource getting its parent 
     66  * Resource getting list of its children 
    6767  * Attaching a resource to another resource 
    6868  * Detaching a resource from another resource 
     
    8282 
    8383== Implementation idea == 
    84 The reference id can be combination of unique id and path like in operating system. Refering children and other resources will be easy (./ ../ etc)  
     84The reference id can be combination of unique id and path like in operating system. Referring children and other resources will be easy (./ ../ etc)  
    8585 
    8686== Related == 
     
    9494[[Image(source:/trunk/sophie2-platform/modules/org.sophie2.base.model.resources/doc/org.sophie2.base.model.resources.jpg)]] [[BR]][[BR]] 
    9595 
    96 A 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. 
     96A 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 its Resource and its sub-objects which state is trackable. 
    9797 * Resource : 
    98   * Can retrieve it's parent if it has such. 
    99   * 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. 
     98  * Can retrieve its parent if it has such. 
     99  * The Resource's entity id is its 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. 
    100100  * The resource location is absolute location of the resource, it can be: 
    101101   * Location on the file system 
     
    114114 * ResourceSpace : 
    115115  * It is responsible for the creation of a resource. Resource can be created in three ways: 
    116    * 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. 
    117    * By it's class and name => In that case the Resource is created in the temporary sophie 2 resource location with the passed name. 
    118    * 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. 
    119   * The ResourceSpace keeps the location and the entity id of it's reosurce. 
    120   * The ResourceSpace gives unique ids for all the ProObjects in it (They are fields in it's Resource or are fields in such ProObjects). 
    121   * The ResourceSpace can get all the Resources in the tree of it's Resource 
     116   * By its class => In that case the Resource's name is generated by its id and the Resource location is set in the temporary sophie 2 resource location with path the newly generated name. 
     117   * By its class and name => In that case the Resource is created in the temporary sophie 2 resource location with the passed name. 
     118   * By its class, passed name and Resource parent => in that case the resource is  nested in the parent. Its location is in the parent's location with path the passed name and the name is validated to be unique against its siblings in the parent. 
     119  * The ResourceSpace keeps the location and the entity id of its Resource. 
     120  * The ResourceSpace gives unique ids for all the ProObjects in it (They are fields in its Resource or are fields in such ProObjects). 
     121  * The ResourceSpace can get all the Resources in the tree of its Resource 
    122122  * 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. 
    123123  * The ResourceSpace is able to copy a Resource into another Resource, and that is the way to add a Resource to another location. 
     
    136136  * Two ResourceRefs are equal if the entity id's and the locations they are pointing to are the equal. 
    137137  * The ResourceRef is can determine whether the Resource it's pointing to is available. 
    138   * The ResourceRef can retrieve it's Resource in two ways : 
    139    * By it's class, if the Resource is top level. 
    140    * By it's locating Resource (i.e. where the ResourceRef is held) and the class of the Resource that is searched. 
     138  * The ResourceRef can retrieve its Resource in two ways : 
     139   * By its class, if the Resource is top level. 
     140   * By its locating Resource (i.e. where the ResourceRef is held) and the class of the Resource that is searched. 
    141141  * The ResourceRef can determine if it points to a Resource. 
    142142 * ResourceLocalCache :