[MAGNOLIA-4651] Create proper types hosting constants and utils for our jcr nodeTypes and their properties Created: 12/Nov/12  Updated: 11/Feb/13  Resolved: 23/Nov/12

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Improvement Priority: Neutral
Reporter: Daniel Lipp Assignee: Daniel Lipp
Resolution: Fixed Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
relation
is related to MAGNOLIA-4640 MetaData as mixin Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-4680 Add checks for proper NodeTypes Sub-task Closed Daniel Lipp  
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

When implementing MAGNOLIA-4640 we realized we should keep the frequently used propertyNames as constants. There's already MgnlNodeType but this is rather confusing because it keeps both nodeTypes and propertyNames.

  • NodeTypes will be implemented as inner classes
  • properties are kept as constants on the inner classes
  • convenience code is kept as methods on the inner classes


 Comments   
Comment by Daniel Lipp [ 19/Nov/12 ]

Next to the constants we added some utility methods. Right now some of them are implemented twice: on NodeUtil and NodeTypes -> only the later should stay.

Comment by Daniel Lipp [ 22/Nov/12 ]

The API on the new inner classes (Mixins) is not very straight.
We should

  • use consistent naming
  • not offer all fine grained methods to set any of the properties (as on MetaData)
Comment by Daniel Lipp [ 23/Nov/12 ]

Latest decisions:

  • we drop "mixin" suffix from NodeTypes.*Mixin inner types
  • we use set(all props) for those mixins where we expect one time only or infrequent changes in prop values and
  • we use update(all props) for those mixins where we expect changes often
  • mix:deleted will use mix:versionable as supertype to avoid duplication of mgnl:comment property definition
Generated at Mon Feb 12 03:57:44 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.