...
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
<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 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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
package campuspipeline.uportal.dlm; import org.w3c.dom.Node; public interface EvaluatorFactory { public Evaluator getEvaluator( Node audience ) throws Exception; } |
...
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
package campuspipeline.uportal.dlm; import org.jasig.portal.security.IPerson; public interface Evaluator { public boolean isApplicable( IPerson person ); } |