Versions Compared

Key

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

...

For example, the Student fragment is configured with this element in dlm.xml

Code Block
borderStyle
xml
xml
borderStylesolid
titleStudent Fragment Configurationsolid
  <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>

The fragment being evaluated is identified by an entry formated like >>>> calling <fragmentName>.isApplicable( <userLoginID> ).
having that fragment name followed by a representation of the syntax of the "isApplicable" method call. So the test of the Student fragment starts on line 3 and returns on line 13 showing that it was not applicable to user mboyd. Now remember that fragments can have zero to many audience evaluators. So the first nested evaluator that is called for any fragmentFrom the log entries below you can see the evaluation of the top level "OR" paren and its nested "AND" paren s it can be seen that the mboyd user is a faculty member and hence is elligible for the Faculty fragmentfragment is an OR paren. Within that evaluator you then begin to see the evaluators reflected by the configuration above.

The AND paren is entered followed by the attribute evaluator that compares all roles held by mboyd, admin and faculty, to the role of student and finds that none match. Hence it then exits with a value of false causing the AND paren and OR parens to do likewise. Only the Faculty fragment is found to be applicable to user mboyd.

Note that the leading timestamp, class, lines, etc., have been removed for brevity.

Note also the logging of user preference attributes including those from preference values set by fragment owners.

Code Block
xml
xml
borderStyledashed
titleSample Fragment Merging Debug Log EntriesborderStyledashed
>>>> calling All Users.isApplicable( mboyd )
 ---- All Users.isApplicable( mboyd )=true
 >>>> calling Students.isApplicable( mboyd )
  >>>> calling paren[campuspipeline.uportal.dlm.provider.Paren@4e4a8a, op=OR].isApplicable()
  >>>> calling paren[campuspipeline.uportal.dlm.provider.Paren@7fc8b2, op=AND].isApplicable()
  >>>> calling Evaluator[role','1','student'].isApplicable()
 ----- comparing value 'student' to role 'admin'
 ----- comparing value 'student' to role 'faculty'
 Evaluating person roles to: false
  ---- Evaluator[role','1','student'].isApplicable()=false
  ---- paren[campuspipeline.uportal.dlm.provider.Paren@7fc8b2, op=AND].isApplicable()=false
  ---- paren[campuspipeline.uportal.dlm.provider.Paren@4e4a8a, op=OR].isApplicable()=false
 ---- Students.isApplicable( mboyd )=false
 >>>> calling Faculty.isApplicable( mboyd )
  >>>> calling paren[campuspipeline.uportal.dlm.provider.Paren@487093, op=OR].isApplicable()
  >>>> calling Evaluator['role','1','faculty'].isApplicable()
 ----- comparing value 'faculty' to role 'admin'
 ----- comparing value 'faculty' to role 'faculty'
 Evaluating person roles to: true
  ---- Evaluator[role','1','faculty'].isApplicable()=true
  ---- paren[campuspipeline.uportal.dlm.provider.Paren@487093, op=OR].isApplicable()=true
 ---- Faculty.isApplicable( mboyd )=true
 >>>> calling Employee.isApplicable( mboyd )
  >>>> calling paren[campuspipeline.uportal.dlm.provider.Paren@56c3cf, op=OR].isApplicable()
  >>>> calling Evaluator[role','1','employee'].isApplicable()
 ----- comparing value 'employee' to role 'admin'
 ----- comparing value 'employee' to role 'faculty'
 Evaluating person roles to: false
  ---- Evaluator[role','1','employee'].isApplicable()=false
  ---- paren[campuspipeline.uportal.dlm.provider.Paren@56c3cf, op=OR].isApplicable()=false
 ---- Employee.isApplicable( mboyd )=false

 ***** mboyd's StructureStylesheetUserPrefereneces

*** Folder Attributes
> n13.width = (33%) 33%
> s12.width = (33%) 33%
> u13l1s11.width = (null) 50%
> u11l1s12.width = (null) 50%
> u11l1s16.width = (null) 20%
> u11l1s9.width = (null) 30%
> u13l1s9.width = (null) 50%

*** Channel Attributes