The initial concept doesn't comprise of a central trait registry which contains all information regarding a trait (i.e. fields, transformers, formatter, etc.).
- "Dynamic" dialogs (similar to configuration on the fly)
- Everything regarding a trait in on place, rather than distributed of mulitple configuration locations
- Add traits on-the-fly (e.g dialogs)
- In any module under the node
- Trait will have a TraitDescriptor + ConfiguredTraitDescriptor
- Use the "default" registry mechanism to regsiter additions/modification
A TraitDescriptor should contain:
- To edit the actual contraint (Voter)
- To edit the value of a trait
- converters for preview
- enables preview of trait in Preview App
- The actual class (POJO) of the trait
Adding the voterClass to the constraint's FieldDefiniton would simplify the dynamic ChooseDialog (We have to read from JCR-level and have to know which field to choose and display in the dialog. The only thing stored in JCR is the voter class).
info.magnolia.p13n.trait.BaseTraitTransformer#getVoterType() could go and we read voter class from P13nFieldDefinition