42 | | * Create class in core.modularity which will represents the resource API. |
43 | | * It have to: |
44 | | * give resources for reading |
45 | | * give resources for modifying them |
46 | | * The |
| 45 | * Create class in core.modularity which will represent the resource API. |
| 46 | * It has to: |
| 47 | * give resource for reading |
| 48 | * give resource for modifying |
| 49 | * give resources by specific extensions(for example only the .sjrb resources). |
| 50 | * list the now available resources. |
| 51 | * The main implementation can be separated in two parts. The differences between them are: |
| 52 | 1. Starting Sophie 2 using FakeAuthorMain launcher |
| 53 | * The resource manager look for the wanted resources in the module resource folders. |
| 54 | * The resource manager creates temp directory(can be default temp folder) in which it writes the given resources, if they are wanted for modifying. |
| 55 | 2. Starting Sophie 2 using TrueAuthorMain launcher(optional for this revision) |
| 56 | * The resource manager reads the resources where they stored after assembling the project. |
| 57 | * The resource manager writes the resources in the same place. |
| 58 | * Note: To know weather the project is started under fake or true launchers use the !SophieModule bundleContext(it should be null when fake starting) variable or !FakeModuleRegistry instance. |
| 59 | |
| 60 | * More specific things for the implementation: |
| 61 | * In the resource loader class use Map structure which has to contain the started modules as keys and URLs to their resources(separated by comma for example) as values. To see which are the started modules use the !FakeModuleRegistry. |
| 62 | * The resource manager has to take the string variable with the wanted resource and return the whole URL to it. |
| 63 | * In the second part of the implementation, when the resource is wanted and is not already shared(for example when the new plugin with resources is provided), the resource manager has to search in the jars of already started modules and extract the resource from them. |