As a developer I can add traits so that an author can use them to define segments, personas and variant constraints (MGNLPN-73)

[MGNLPN-75] Implement trait registry mechanism Created: 16/Apr/14  Updated: 24/Apr/14  Resolved: 24/Apr/14

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

Type: Sub-task Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File TraitDefinitionRegistryTest.patch    
Template:
Date of First Response:
Sprint: 5.3 Sprint 6

 Comments   
Comment by Roman Kovařík [ 16/Apr/14 ]

Commits:
https://git.magnolia-cms.com/gitweb/?p=enterprise/p13n.git;a=commitdiff;h=70b1ec09418977d9a2cdcab1aaa492126a602043
https://git.magnolia-cms.com/gitweb/?p=enterprise/p13n.git;a=commitdiff;h=8d91c1426a4f8d6be78e2b72c8ed4c43f147a900
https://git.magnolia-cms.com/gitweb/?p=enterprise/p13n.git;a=commitdiff;h=9d2ca9f4b5d51f7aec6fc809de16a26f780dfec6
https://git.magnolia-cms.com/gitweb/?p=enterprise/p13n.git;a=commitdiff;h=b364db4442507ae2a8601a9d013a6895e7e3afaa

Comment by Philip Mundt [ 23/Apr/14 ]
  • TraitDefinitionRegistry should be injectable in other components, thus a component definition in the module-descriptor is required.
  • info.magnolia.p13n.registry.TraitDefinitionRegistryTest#createTraitDefinitionProvider() signature of method has unused variable boolean enabled
  • Fix javadoc of info.magnolia.p13n.registry.TraitDefinitionRegistryEventType
Comment by Roman Kovařík [ 23/Apr/14 ]

Commit:
https://git.magnolia-cms.com/gitweb/?p=enterprise/p13n.git;a=commitdiff;h=155f3a173bec0cdf17b0714192e0f4263c6b558a

Comment by Philip Mundt [ 24/Apr/14 ]

RE QA:

  • info.magnolia.p13n.registry.TraitDefinitionRegistry
    • Remove unused methods:
      • public void register(TraitDefinitionProvider provider) throws RegistrationException
      • public void unregister(String name) throws RegistrationException
      • private void sendEvent(TraitDefinitionRegistryEventType eventType, Collection<TraitDefinition> traitDefinitions)
    • public Set<String> unregisterAndRegister(Set<String> registeredNames, List<TraitDefinitionProvider> providers) doesn't throw a RegistrationException because it is caught
      • try/catch-block in info.magnolia.p13n.registry.ConfiguredTraitDefinitionManager has to go
  • info.magnolia.p13n.registry.TraitDefinitionRegistryTest please add test from patch file attached
Comment by Roman Kovařík [ 24/Apr/14 ]

Commit:
https://git.magnolia-cms.com/gitweb/?p=enterprise/p13n.git;a=commitdiff;h=d17a5cf6e591dfec20e5a2c3b8bfaaa70377a4a9

Generated at Mon Feb 12 06:34:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.