300 likes | 449 Views
Overview of Distributed Layout Manager. Presented by: Mark Boyd, SunGard SCT Marlin Benson, SunGard SCT Todd Trann, University of Saskatchewan. Definition of Distributed Layout Manager. The Distributed Layout Manager gives a Fragment Owner the capability of pushing content to users.
E N D
Overview of Distributed Layout Manager Presented by: • Mark Boyd, SunGard SCT • Marlin Benson, SunGard SCT • Todd Trann, University of Saskatchewan
Definition of Distributed Layout Manager • The Distributed Layout Manager gives a Fragment Owner the capability of pushing content to users. • A Fragment is simply a collection of content that can be placed on a tab. • The Fragment Owner is someone who has rights to add content to a fragment. • A Fragment Audience is the set of users that the fragment will be pushed out to. • The DLM feature also allows a fragment owner to restrict actions available individual users in the fragment audience with respect to the fragment content.
Standard Layout defaultTemplateUser defines Student Layout demo Layout snapshot Student Layout
Integrated Layout news-lo defaultTemplateUser defines News Fragment demo Layout dynamic update snapshot Student Integrated Layout
How do I Install and run DLM? • DLM is now located in uPortal version 2.5 • Activate DLM by performing the following steps: 1. Stop the web server. 2. Change properties in portal.properties org.jasig.portal.layout.UserLayoutStoreFactory.implementation =org.jasig.portal.layout.dlm.RDBMDistributedLayoutStore org.jasig.portal.layout.UserLayoutManagerFactory.coreImplementation =org.jasig.portal.layout.dlm.DistributedLayoutManager 3. Update Database table UP_USER_PROFILE UPDATE UP_USER_PROFILE SET STRUCTURE_SS_ID = 4, THEME_SS_ID = 3 WHERE THEME_SS_ID = 11; 4. Start the web server
DLM.XML • Fragments, Fragment Owners, and Fragment Audiences are defined in the file dlm.xml. • The top level element in dlm.xml is the <managedLayoutFragments> element. <managedLayoutFragments xmlns:dlm="http://org.jasig.portal.layout.dlm.config"> • The only two supported child elements for the <managedLayoutFragments> element are <property> and<fragment>
<property> Element • The <property> child element of the top level managedLayoutFragments element requires two attributes, ‘name’ and ‘value’. • There are currently only two properties supported by DLM • <dlm:property name='defaultLayoutOwner' value='fragmentTemplate'/> • <dlm:property name= 'org.jasig.portal.layout.dlm.RDBMDistributedLayoutStore.fragment_cache_refresh' value="5"/>
<fragment> element • The <fragment> child element of the top level managedLayoutFragments element is used to define a fragment. <dlm:fragment name='Guests' ownerID='guest-lo' precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GuestUserEvaluatorFactory'/> </dlm:fragment>
<fragment> element • The <fragment> child element of the top level managedLayoutFragments element is used to define a fragment. <dlm:fragment name='Guests' ownerID='guest-lo' precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GuestUserEvaluatorFactory'/> </dlm:fragment>
<fragment> element • The <fragment> child element of the top level managedLayoutFragments element is used to define a fragment. <dlm:fragment name='Guests' ownerID='guest-lo' precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GuestUserEvaluatorFactory'/> </dlm:fragment> • - ant md5passwd -Dusername=guest-lo
<fragment> element • The <fragment> child element of the top level managedLayoutFragments element is used to define a fragment. <dlm:fragment name='Guests' ownerID='guest-lo' precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GuestUserEvaluatorFactory'/> </dlm:fragment>
DLM’s Concept of Precedence • The precedence value is relative only. • User layout elements have a precedence of zero. • Layout owner can lock a tab as not moveable. • A tab with a higher precedence value can override a locked tab in a more valuable real estate location. • Real estate values (tabs, columns, and channels).
<audience> element • The <audience> child element of the <fragment> element is used to define a fragment audience. <dlm:fragment name='Guests' ownerID='guest-lo'precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GuestUserEvaluatorFactory'/> </dlm:fragment>
Simple Default Evaluator Factories • Default evaluator factories are found in the org.jasig.portal.layout.dlm.providers package: • The GuestUserEvaluatorFactory <dlm:fragment name='Guests' ownerID='guest-lo' precedence='10'> <dlm:audience evaluatorFactory= 'org.jasig.portal.layout.dlm.providers.GuestUserEvaluatorFactory'/> </dlm:fragment> • The AllUsersEvaluatorFactory <dlm:fragment name='AllUsers' ownerID='allusers-lo' precedence='50'> <dlm:audience evaluatorFactory= 'org.jasig.portal.layout.dlm.providers.AllUsersEvaluatorFactory'/> </dlm:fragment>
PersonEvaluatorFactory • This factory produces an evaluator that supports complex grants of the fragment that are made based on attributes found in the passed-in IPerson object. • <paren> ELEMENT Attribute: mode (optional). Possible values are: OR (default), AND, or NOT. • <attribute> ELEMENT Attributes: name (required), mode (required), and value (optional). Possible values for mode are: exists, equals, contains, startsWith, and endsWith.
The Entertainment Fragment <dlm:fragment name='Entertainment' ownerID='ent-lo' precedence='100'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.PersonEvaluatorFactory'> <paren mode="NOT"> <attribute name="username" mode='equals' value='guest'/> </paren> </dlm:audience> </dlm:fragment>
GroupMembershipEvaluatorFactory • This factory returns an evaluator that can evaluate group memberships. • The syntax semantics are identical to PersonEvaluatorFactory except for the <attribute> element. mode = ‘memberOf’ name = <valid group in uPortal>
The News Fragment <dlm:fragment name='News' ownerID='news-lo' precedence='80'> <!-- <dlm:role>Students who are not also Faculty members</dlm:role> --> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GroupMembershipEvaluatorFactory'> <paren mode="AND"> <attribute mode='memberOf' name='Students'/> <paren mode="NOT"> <attribute mode='memberOf' name='Faculty'/> </paren> </paren> </dlm:audience> </dlm:fragment>
Custom Evaluator Factories • Implement the org.jasig.portal.layout.dlm.EvaluatorFactory interface. public Evaluator getEvaluator( org.w3c.dom.Node audience ) throws Exception; • Implement the org.jasig.portal.layout.dlm.Evaluator interface. public boolean isApplicable( IPerson p ); • Future direction of DLM.
Summary of Potentially Restricted Activities within DLM • Tabs 1. Move Tab 2. Edit Properties (name) 3. Add columns 4. Delete tab • Columns 1. Move column 2. Edit Properties (width) 3. Add channels 4. Delete column • Channels 1. Move channel 2. Delete channel
U of S Layout Design Approach Original committee design (2003): • different home tabs for each role; plus • additional tabs conditionally merged in; plus • a set of tabs for all users
A Look at Some Default Layouts Live demo during JA-SIG, static slides for the presentation archive The screenshots will show, in this order: • employee default layout • faculty default layout • student default layout
Portion of U of S dlm.xml <dlm:fragment name='Alumni' ownerID='alumni-lo' precedence='100'> <dlm:role>alumni</dlm:role> <dlm:audience evaluatorFactory='com.pipeline.uportal.dlm.provider.CPPersonEvaluatorFactory'> <paren mode="AND"> <attribute name='role' mode='equals' value='alumni'/> <paren mode="NOT"> <attribute name='role' mode='equals' value='student'/> </paren> <paren mode="NOT"> <attribute name='role' mode='equals' value='faculty'/> </paren> <paren mode="NOT"> <attribute name='role' mode='equals' value='employee'/> </paren> <paren mode="NOT"> <attribute name='role' mode='equals' value='eligibletoregister'/> </paren> <paren mode="NOT"> <attribute name='role' mode='equals' value='advisor'/> </paren> </paren> </dlm:audience> </dlm:fragment>
Lessons learned • wrong approach was taken with regards to home tab • users are traumatized when their home tab changes are discarded • we need to stop regarding user's home tab as "web pages", it is very personal space • maintaining multiple home tabs is time-consuming • - looking forward to "smart tabs" (my term) with Luminis 4 / uPortal 2.5