Les DLM (oufragmentou fragment)
Les DLM Sont le nouveau mode de fonctonnement des environnements utilisateur (précédemment ALM).
Sommaire | ||||||
---|---|---|---|---|---|---|
|
Principe
On définit dans un fichier XML (dlm.xml) le ciblage fragment <=> utilisateur.
...
Bloc de code |
---|
<?xml version="1.0"?> <!-- $Header$ --> <managedLayoutFragments xmlns:dlm="http://org.jasig.portal.layout.dlm.config"> <dlm:property name='defaultLayoutOwner' value='fragmentTemplate'/> <!-- <dlm:property name='layoutDecorator' value='someClass'/> --> <!-- Controls clearing of dlm fragment cache. This allows changes changes made to layout owners to be reflected once the cache has been updated. Specified in minutes. --> <dlm:property name='org.jasig.portal.layout.dlm.RDBMDistributedLayoutStore.fragment_cache_refresh' value="5"/> <dlm:fragment name='Guests' ownerID='guest-lo' precedence='20'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GuestUserEvaluatorFactory'/> </dlm:fragment> <dlm:fragment name='Admin' ownerID='admin-lo' precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.PersonEvaluatorFactory'> <paren mode="AND"> <attribute name="username" mode='equals' value='admin'/> </paren> </dlm:audience> </dlm:fragment> <dlm:fragment name='Default' ownerID='default-lo' precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GroupMembershipEvaluatorFactory'> <paren mode="AND"> > <attribute mode='deepMemberOf' name='Etablissement'/> </paren> </dlm:audience> </dlm:fragment> </managedLayoutFragments> |
...
Détails d'un fragment
Bloc de code |
---|
<dlm:fragment name='Default' ownerID='default-lo' precedence='10'> <dlm:audience evaluatorFactory='org.jasig.portal.layout.dlm.providers.GroupMembershipEvaluatorFactory'> <paren mode="AND"> > <attribute mode='deepMemberOf' name='Etablissement'/> </paren> </dlm:audience> </dlm:fragment> |
On retrouve :
...
- PersonEvaluatorFactory
- equals
- exists
- contains
- startsWith
- endsWith
- GroupMembershipEvaluatorFactory
- memberOf (Membre direct)
- deepMemberOf (Membre Recusif)
...