73 | | ^(Describe your design here.)^ |
| 73 | The solutions is based on following components |
| 74 | == Refactoring == |
| 75 | * !HandleContext - is used by all the !BaseHandlerSupport subclasses instead of Request and Response so a developer will can easily mock it. |
| 76 | * WebUIContext - has common access to WebUI module extension points including (connectors and resourceHelper) also some logic about getting the right facade and opening accesses. |
| 77 | == New Features == |
| 78 | * !ServerResourceHalper - Now there is the server data initialization logic and also holds the server resource app locator. |
| 79 | * Navigator - Takes care of navigation. It is produced by the !HandleContext. |
| 80 | * Views - some new views are implemented for directory and book resources (resource_directory.jspx and resource_book.jspx). Also the default resource view (resource.jspx) was fixed. |
| 81 | * resource changes - there are now a tag resourceChanges which prints the history of given resource. |
| 82 | * actions - there are tags for different resource actions. For now they are download view and delete. |
| 83 | * Renderers |
| 84 | * When a request is received to execute some action about some resource a !ResourceRenderer is handling the logic. |
| 85 | * The !ResourceRendererProvider creates a renderer for specified resource and action |
| 86 | * Renderer implementations |
| 87 | * !ViewResourceRenderer - is created by given resource and view page. There is convention about resource view page names. There is one default called resource.jspx and if there is specific |
| 88 | view page for different kind of resource they should be named resource_<kind>.jspx where <kind> is the kind of the resource. for example resource_directory.jspx, resource_book.jspx - directory and book are resource kinds. |
| 89 | * DownloadResourceRenderer - Creates a zip for the resource and returns it to the client. |
| 90 | * !DeleteResourceRenderer - Deletes a resource and redirects to parent. |
| 91 | * Upload - a resource can be uploaded in resource directory. The request for uploading are handled by !UploadResourceHandler. It find the parent directory by inspecting the referrer request header. |
| 92 | * Upload make uses of Jetty's !MultipartFilter. |