430 likes | 573 Views
Using uPortal Distributed Layout Manager. Susan Bramhall Yale University ITS June 6, 2006. Who am I?. Yale University Portal Implementer Occasional contributor to uPortal Early adopter of Distributed Layout Manager Grandmother. What Will I cover?. The layout manager’s job
E N D
Using uPortal Distributed Layout Manager Susan Bramhall Yale University ITS June 6, 2006
Who am I? • Yale University Portal Implementer • Occasional contributor to uPortal • Early adopter of Distributed Layout Manager • Grandmother
What Will I cover? • The layout manager’s job • Distributed Layout Manager basics • How to create layout fragments using uPortal users and groups • How user content changes and managed content changes interact • Moving from SLM to DLM
Before I begin • Mark Boyd’s excellent documentation is on the uPortal wiki: http://www.ja-sig.org/wiki/x/pjQ • Or
What does the user see? • We want to • Push content to users based on who they are • But, allow users to choose what they see • How? • By working with the layout manager
folder type=“root” folder (tab) folder (tab) folder (tab) folder (column) folder (column) folder (column) folder (column) folder (column) channel channel channel channel channel channel channel The Layout An xml tree of generic folders and channels
The Layout Manager’s Job To direct the show the Layout Manager must • Know where to start • Have rules to follow to include the right content and exclude everything else • And where each segment goes
Of Fragments and Templates • A template is a starting point for personal layout • A fragment is a living segment of pushed content
Publish, Subscribe, , Pull • Publishing is what an administrator does • Subscribing is what a user does • Administrators can also PUSH content • Pull = Subscribe
Concepts • Fragments and Templates • Publish and Subscribe • Push and Pull • Audience • Precedence and Restrictions
Which Layout Manager? • Simple Layout Manager (SLM) • uPortal 1.0 to present • Aggregated Layout Manager (ALM) • uPortal 2.0 to present • Distributed Layout Manager (DLM) • uPortal 2.5 to present
Simple Layout Manager • uPortal 1.0 – 2.5 but no longer default • Based on completely templates • Allows personal layout for each user • But personalized layout is a copy • New content in template is lost on users who have customized
Aggregated Layout Manager • uPortal 2.0 – now • Will NOT be the future default • Based on fragments (think tab) and templates • Can push fragments • Can subscribe to whole fragments • Allows personal layout for each user but fragments are read only
Distributed Layout Manager • Default in uPortal 2.6 • Templates and Fragments • Fragments can be modified • Cannot subscribe to a fragment (yet) • Allows personal layout for each user and user changes are merged with changes to fragments • Incremental change to SLM
Steps to Pushing DLM Fragment • Define the fragment in dlm.xml • Login as the fragment owner and set up the layout
Define the Fragments • dlm.xml configuration • Each Fragment definition includes • An owner • Precedence • Audience
Audience • Everyone needs the right audience! • Built-in evaluators • Boolean expressions • Extensible API
Defining the audience • Built in Audience Evaluators • GuestUserEvaluatorFactory • AllUsersEvaluatorFactory • GroupMembershipEvaluatorFactory • PersonEvaluatorFactory • Or implement Evaluator interface
User Attributes • IPerson is the basic user object • Attributes come from jdbc or ldap • Or any other source you invent
PersonEvaluatorAudience • Tabs based on Person attributes • PersonDirectory Flexibility
compositeGroupServices.xml • Starts with Local groups from uPortal database • Includes comments for • LDAP group service (beware) • File System group service • Person Attribute Group service (PAGS)
GroupMembershipEvaluator Audience • Fragment based on Group
Boolean Expressions <dlm:fragment name='News' ownerID='news-lo' precedence='80'> <dlm:audience evaluatorFactory= ‘...GroupMembershipEvaluatorFactory‘> <paren mode="AND"> <attribute mode='memberOf' name='Students'/> <paren mode="NOT"> <attribute mode='memberOf' name='Faculty'/> </paren> </paren> </dlm:audience> </dlm:fragment>
Precedence and Restrictions • Precedence attribute in dlm.xml determines order • Restrictions determined by layout owner • End result is pushed content merged with personal changes
Create Fragment Content • Login to the Fragment owner account
And edit as usual • Extra controls are available
How It Works • At start up dlm.xml is parsed and each fragment is read in and cached • When the user logs in • Each fragment is evaluated and included or not • Saved personal layout and directives are read • Layout is built by merging • Changes are saved to personal layout • Changes to fragments are incorporated on interval
Conversion to DLM • What Yale did (ugh) • The gory details are here: http://tp.its.yale.edu/confluence/x/zAE • What the future holds
Yale Conversion Color coded the preferences channel so users can distinguish pushed from personal
Yale Conversion • Renamed Tabs in saved layouts – very ugly • Pushed layout instructions to those who had customized (Thank you DLM) • It was kind of ugly but it worked
A Better Future • New tool to migrate user layouts between layout managers • This is possible because elements have unique identifiers which do not change when they are moved or copied • The tool will also be useful for migrating to uPortal 3
Comparing Customized Layouts Template Layout Customized User Layout Moved C3 Added C7 Deleted C2
Comparison Results <layout-diff> <owner>dalquist</owner> <changes> <add node=“C7” parent=“T1” previous-sibling=“C1”/> <move node=“C3” parent=“T2” previous-sibling=“C4/> <delete node=“C2”/> </changes> </layout-diff>
How It Works • The template layout needs to be re-created using the new Layout Manager first • The source template layout and destination template layout are compared • Layout Manager APIs are used to compare each users layout to the template layout
Future Becoming Reality • At this point the tool is only a concept, Rutgers has plans to create the tool, no firm date yet • The tools design works with any layout manager implementation • Could also be used for layout migration between portal installs or versions of the portal (uP2 to uP3)