140 | | * The ResourceRef can determine if it points to a Resource. |
| 141 | * The ResourceRef can determine if it points to a Resource. |
| 142 | * ResourceLocalCache : |
| 143 | * It keeps the Resources that are loaded in the application and provides functionality for finding them by their entity ids and locations, absolute or relative. |
| 144 | * It can search for Resources only in the cache but it will be able to search for Resources and on the File System and the Server in the next Revisions. |
| 145 | * It provides functionality for locating a parent of a Resource and even the nearest parent in the tree by given type. |
| 146 | * Is used to locate the Resources by the ResourceRefs, first by their entity ids, second by their absolute or relative paths, the paths are constructed like /parent1_name/parent2_name/resource_name, so the parents and the siblings can be retrieved easily. If a Resource is not found in the cache it can be found where it is stored and that cached. |
| 147 | |
| 148 | All this four structures build the Resource trees and will be used to store resource content and to retrieve it. The attaching a resource to another is simply creating it or coping it to the parent resource. Renaming is not permitted so the parents and the siblings can be determined by their locations. Deleting(Detaching) and moving a resource can be done in the next revision with copying the resource in the new place, and destroying it. In such way we can have all the operation on a resource and can locate it anywhere. |