Changes between Version 21 and Version 22 of GROUP_RESOURCE_R0
- Timestamp:
- 04/21/09 14:25:51 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GROUP_RESOURCE_R0
v21 v22 63 63 * This should update the status property 64 64 * Getting resource location 65 * Resource getting it 's parent66 * Resource getting list of it 's children65 * Resource getting its parent 66 * Resource getting list of its children 67 67 * Attaching a resource to another resource 68 68 * Detaching a resource from another resource … … 82 82 83 83 == Implementation idea == 84 The reference id can be combination of unique id and path like in operating system. Refer ing children and other resources will be easy (./ ../ etc)84 The reference id can be combination of unique id and path like in operating system. Referring children and other resources will be easy (./ ../ etc) 85 85 86 86 == Related == … … 94 94 [[Image(source:/trunk/sophie2-platform/modules/org.sophie2.base.model.resources/doc/org.sophie2.base.model.resources.jpg)]] [[BR]][[BR]] 95 95 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.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 its Resource and its sub-objects which state is trackable. 97 97 * 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. 100 100 * The resource location is absolute location of the resource, it can be: 101 101 * Location on the file system … … 114 114 * ResourceSpace : 115 115 * 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 Resource116 * 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 122 122 * 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. 123 123 * The ResourceSpace is able to copy a Resource into another Resource, and that is the way to add a Resource to another location. … … 136 136 * Two ResourceRefs are equal if the entity id's and the locations they are pointing to are the equal. 137 137 * 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. 141 141 * The ResourceRef can determine if it points to a Resource. 142 142 * ResourceLocalCache :