Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

This page is related to the Aggregated Layout Management Convergence 2.x effort that will be added to 3.x.

Properties Defined dlm:property tag explained.
Fragments Defined dlm:fragment tag explained.
Roles Defined dlm:role tag explained.
Audiences Defined dlm:audience tag explained.

Code Block
xml
xml
borderStylesolid
titledlm.xmlborderStylesolid
<managedLayoutFragments xmlns:dlm="http://www.campuspipeline.com/uportal/dlm">

  <dlm:property name='defaultLayoutOwner' value='fragmentTemplate'/>
  <dlm:property name='layoutDecorator' value='com.pipeline.uportal.dlm.provider.CpLayoutDecorator'/>
  <dlm:property name='campuspipeline.uportal.dlm.debug' value="false"/>
  
  <!-- Controls clearing of dlm fragment cache.  This allows changes  made to layout
  owners to be reflected once the cache has been updated.  Specified in minutes. -->
  
  <dlm:property name='campuspipeline.uportal.dlm.fragment_cache_refresh' value="60"/>

  <dlm:fragment name='Faculty' ownerID='faculty-lo' precedence='50'>
   <dlm:role>faculty</dlm:role>
   <dlm:audience evaluatorFactory='com.pipeline.uportal.dlm.provider.CPPersonEvaluatorFactory'>
     <attribute name='role' mode='equals' value='faculty'/>
   </dlm:audience>
  </dlm:fragment>

  <dlm:fragment name='All Users' ownerID='allusers-lo' precedence='100'>
   <dlm:audience evaluatorFactory='campuspipeline.uportal.dlm.provider.AllUsersEvaluatorFactory'/>
  </dlm:fragment>

  <dlm:fragment name='Students' ownerID='student-lo' precedence='100'>
   <dlm:role>student</dlm:role>
   <dlm:audience evaluatorFactory='com.pipeline.uportal.dlm.provider.CPPersonEvaluatorFactory'>
     <paren mode="AND">     
       <attribute name='role' mode='equals' value='student'/>
       <paren mode="NOT">
         <attribute name='role' mode='equals' value='faculty'/>
       </paren>
     </paren>
   </dlm:audience>
 </dlm:fragment>
  
  <dlm:fragment name='Employee' ownerID='employee-lo' precedence='30'>
   <dlm:role>employee</dlm:role>
   <dlm:audience evaluatorFactory='com.pipeline.uportal.dlm.provider.CPPersonEvaluatorFactory'>
     <attribute name='role' mode='equals' value='employee'/>
   </dlm:audience>
  </dlm:fragment>

</managedLayoutFragments>

...

The <dlm:fragment> element has four possible attributes and can contain , one or more nested <dlm:role> elements (see Roles Defined), and zero to many nested <dlm:audience> elements or comments. The audience elements indicate to whom the fragment will go. See Audiences Defined for more detail.

...

Anchor
roles
roles

Roles Defined

There roles element is

The roles element determines to what group a fragment owner will belong. Multiple role elements for a fragment means that the fragment owner is a member of each of these groups. The fragment owner is defined by the ownerID attribute of the containing fragment element and represents the user account whose layout is used as the layout for the fragment. When modifying the layout, channels can be added. Channels are themselves granted only to certain groups of users. As such there is the potential for a fragment owner to have one set of group memberships and the users of that fragment to have other disjoint group memberships. In such cases channels added to the surface of that layout and them merged into the user's layouts will show up as broken and indicate that the user does not have access to that channel.

The role element is a step toward resolving such problems. Upon loading dlm.xml the infrastructure looks to see what groups the fragment owner is a member and removes them from all groups except the ones indicated by the nested role elements. Additionally, if they are not a member of these groups then they are made a member of each.

New features slated to be added as part of the ALM Convergence effort will render this declaration unnecessary. The goal is for the fragment editing UI to indicate which channels added to the fragment may not be available to all users of the fragment as defined by the set of users to whom the fragment is published for pushed fragments or the users who can subscribe to the fragment for pulled fragments.

Anchor
audiences
audiences

Audiences Defined

...

The <dlm:audience> has one required attribute: evaluatorFactory. The contents of the element are completely defined by the class declared in the evaluatorFactory attribute. For example, in the sample dlm.xml file above the "All Users" fragment has an audience tag that declares the AllUserEvaluatorFactory for determining its audience, the users to whom the fragment will be pushed. This factory supports not configuration and hence the audience tag is empty.

Attribute

Description

evaluatorFactory

Required. A fully qualified name of a class that implements the EvaluatorFactory interface outlined below.

The EvaluatorFactory interface is as shown below. It is passed an org.w3c.dom.Node object representing the audience node in the dlm.xml file and can be used by the factory to configure and return an object implementing the Evaluator interface. The object returned can be contructed in some manner appropriate for any configuration information declared within the audience tag.

Code Block
java
java
borderStylesolid
titleEvaluatorFactory.java


package campuspipeline.uportal.dlm;

import org.w3c.dom.Node;

public interface EvaluatorFactory
{
    public Evaluator getEvaluator( Node audience )
    throws Exception;
}

The Evaluator interface is as shown below. It is passed an IPerson object and returns true or false. This is the mechanism used to determine if a fragment is supposed to be pushed to a specific user at log-in time.

All fragments in the above sample dlm.xml file use a CPPersonEvaluatorFactory, a trivial subclass of the real workhorse IPersonEvaluatorFactory. This factory defines a boolean syntax for configuration that allows evaluation of a role attribute that is multivalued and represents a user's group membership. See Sungard SCT ALM IPersonEvaluatorFactory for information on configuration syntax supported by this evaluator factory and the classes used to implement that syntax.

Code Block
java
java
borderStylesolid
titleEvaluator.java

package campuspipeline.uportal.dlm;

import org.jasig.portal.security.IPerson;

public interface Evaluator
{
    public boolean isApplicable( IPerson person );
}