As a marketing manager, I can also associate segments with a variant page so that this variant is rendered for visitors that fit into the segment. (MGNLPN-26)

[MGNLPN-46] Adjust BaseVariantResolver to take associated segments into account Created: 24/Mar/14  Updated: 25/Mar/14  Resolved: 25/Mar/14

Status: Closed
Project: Magnolia Personalization
Component/s: Integration
Affects Version/s: None
Fix Version/s: 1.0

Type: Sub-task Priority: Neutral
Reporter: Philip Mundt Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Sprint: 5.3 Sprint 4

 Description   

Currently, the BaseVariantResolver only checks mgnl:constraintSet and evaluates them. He should however also consider any segments that are set in mgnl:assignedSegments.

For the time being, the BaseVariantResolver shall get any segment via JCR session, convert the node into a bean and add them to the evaluation process.

  • multiple segments are evaluated by OR
  • possibly combined with existing contraintSets by AND


 Comments   
Comment by Philip Mundt [ 25/Mar/14 ]

Minor adjustments:

  • Please move @see javadoc comment from info.magnolia.p13n.variant.BaseVariantResolver#getVariantNode() to private methods and adjust javadoc accordingly
  • use segmentSet.setVoting(Voting.AND) or segmentSet.setVoting(Voting.OR) rather than setOp()
  • Please extract creation of Voters on Nodes info.magnolia.p13n.variant.BaseVariantResolverTest#createSegment() and info.magnolia.p13n.variant.BaseVariantResolverTest#createConstraintSet() into method.
  • Add test for the case of just an associated segment (without constraintSet)
Generated at Mon Feb 12 06:33:46 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.