Propositions concerning collections and views
From Armarius
Return to the main page Development documentation
[edit] Specifications (30/07/07)
The users will see the views of the real/physical collections, created by the administrator(s). In the views, there will only be pages (and not subcollections). For example, if we have a collection C1 which contains Page1, Page2 and the collection C2, which contains Page3 and Page4, there will be two views : - View 1 with Page1, Page2, Page3 and Page4 - View 2 with Page3 and Page4. Moreover, a registered user can create, if he has the rights for it, personalized views and so virtual collections which are subcollections of real collections. These personalized views must be seen, if the user has chosen them to be public, by the members of the same groups that him. Else, the views are private and only the user has access to them. We are speaking about public and private personalized views, so we have to say that the views of the real collections are all public. Furthermore, there won't be any view at the root and the personalized views will be shown after sort.
To see these views in the database, we have to add two new tables :
- armarius_view (view_id, view_col_id, view_user_id, view_visibility)
This table shows the views created by users on collections and their visibility. The field "visibility" could be equal to 0 (would mean the view is private) or to 1 (would mean the view is public).
- armarius_view_content(vc_view_id, vc_pg_id)
This table shows what pages are in views.
Here are the scripts of creation of these tables
Here you can see the new structure of the database of Armarius [[1]]
[edit] Specifications (03/08/07)
There will be physical views which correspond to the physical collections and which will be visible or invisible to groups. It's the same for the personalized views. To realize that, we will use the field "view_visibility" of the table "armarius_views" as a field of bits : the first bit (on the right) will concern the physical views. It will be equal to 0 if the views are invisible and it will be equal to 1 if the views are visble. After the import, the bit will be equal to 1. The second bit (on the right) will concern the personalized views. When a user creates a personalized view, the bit will be equal to 0 ; then, it will be equal to 1 if the user chooses to show his personalized view to people who are in the same groups, or equal to 0 if the user wants his personalized view to be seen only by himself.


