Aggregated Layout Manager
There are some significant differences between the first version of ALM 1.0 that has been existing since uPortal 2.2 and ALM 2.0 that is supposed to be implemented in uPortal 3 and then probably ported to uPortal 2.x.
The new features included in ALM 2.0 are the following:
- User-modifiable fragment support
- New algorithm of layout assembly
- Central and local layout modifications paradigm
- Layout command manager
- Permissions for fragments and fragment nodes
- Enhanced restriction management
Overview
User-modifiable fragments are the major part of ALM 2.0 functionality allowing users to modify pushed and pulled fragments in their layouts and store changes in a database. To distinguish the layout changes made by fragment owners and regular users the central and local modifications have been introduced. The local modifications take place when users modify only the content of their own layouts as contrasted to central ones when fragment changes should be reflected in layouts of all users subscribed to fragments being modified. The new layout assembler executes commands for each node in the layout starting construction with the central (user) fragment according to the following algorithm:
- Obtain the user fragment, set it to be root
- Initialize the current layout with the user fragment
- Make sure that the lost folder is always a part of the user fragment (or should be created automatically upon demand)
- Obtain the list of all pushed and pulled fragments
- Obtain the list of layout operations
- Perform operations, recording which pushed fragments have been successfully attached
- Attach remaining pushed fragments
- Check restrictions and move wrong nodes to the lost folder
One of the main aspects of ALM is that the user layout does not depend on "tab-column" metaphor, it can deal with hierarchical layouts of any depth applying as many restrictions as it needs to any nodes of the layout tree. The layout itself does not contain any user-specific parameters (like column widths or window states) and its assembly should start with adding the one connected part (or in other words a tree from Theory of Graphs) - the user fragment.
Local layout modifications
When users modify their layouts (fragments) in this mode all changes they make are local and belong to one particular layout. All layout commands consistently get recorded in the list of operations, which is later used during the layout assembly. The layout command manager is responsible for managing this list and executing operations that it contains.
Central fragment modifications
This type of modifications is used by fragment authors or authorized users to make centralized fragment changes and thus distribute them to other user layouts. These layout operations are not recorded and executed immediately.
Layout Command Manager
The layout command manager keeps the list of recorded layout operations, records layout commands, provides logic for reducing the list size, executes operations on the given layout.