[MAGNOLIA-5365] Create a NodeType migration task Created: 08/Oct/13  Updated: 30/Oct/13  Resolved: 20/Oct/13

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.0, 5.1
Fix Version/s: 5.1.1

Type: Task Priority: Neutral
Reporter: Eric Hechinger Assignee: Eric Hechinger
Resolution: Fixed Votes: 0
Labels: 4.5_to_5_migration
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MAGNOLIA-5386 Create a NodeType migration task that... Closed
causality
is causing MAGNOLIA-5429 AbstractNodeTypeRegistrationTask prod... Closed
relation
is related to MAGNOLIA-5403 In AbstractNodeTypeRegistrationTask r... Open
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Sprint: 5.2-rc1

 Description   

Create a NodeType migration task.
The NodeType definition has changed between 4.5.x and 5.x. For example, in 5.x, we introduce new mixin NodeType definition or removed the metadata node as mandatory child node...

In order to perform an Upgrade from M4.5.x to M5.x we need to have a task that allows to propagate these changes.

Concept page
http://wiki.magnolia-cms.com/pages/viewpage.action?pageId=73666272



 Comments   
Comment by Tobias Mattsson [ 17/Oct/13 ]

NodeTypeTemplateUtil

  • createSimpleMixinNodeType and createSimpleNodeType should throw RepositoryException, not log and return null. There are no null-checks in place for checking for a null return value, with this design there has to be at all invocations.
  • in createPropertyDefinition the argument requiterType should be requiredType
  • please use @param for documenting method parameters
Comment by Tobias Mattsson [ 17/Oct/13 ]

AbstractNodeTypeRegistrationTask

  • getNodeTypesToUnRegister should have lowercase R in Unregister, the argument should also be nodeTypeToUnregister rather than nodeTypeToUnRegister
  • registerNodeType should be in plural, registerNodeTypes, since it registers multiple node types, its argument should also be in plural
  • unRegisterNodeType same as above plus should be renamed unregisterNodeType
  • spelling mistakes, keeped should be 'kept' and exisitng should be 'existing'
  • getFilterNodeToUnregister should be plural since it returns a list
  • getFilterNodeToUnregister, the variable nodeTypeToRegister seems misspelled, should this be filteredNodeTypeToUnregister instead?
  • getNodeTypesToRegister should be allowed to throw RepositoryException and the task should fail if it does
  • getNodeTypesToUnregister should be allowed to throw RepositoryException and the task should fail if it does
  • getDependingNodeType should be getDependentNodeTypes

But more importantly, it depends on Jackrabbit, we want to support any JCR implementation and so can't assume that we're running on Jackrabbit. The call to NodeTypeRegistry#getDependentNodeTypes() need to be replaced with another solution.

Comment by Tobias Mattsson [ 18/Oct/13 ]

NodeTypeTemplateUtil.createPropertyDefinition

  • argument is still called requiterType

AbstractNodeTypeRegistrationTask.getFilterNodeToUnregister

  • lets make it getFilteredNodeToUnregister
  • renamed the variable registeredNodeTypes to filteredNodeTypes

AbstractNodeTypeRegistrationTask.unregisterNodeTypes

  • the log messages say "Un Registration" and "Un Registered" should be "Unregistration" and "Unregistered"

AbstractNodeTypeRegistrationTask.registerNodeTypes

  • the log message say "Re register" should be "Reregister"
Generated at Mon Feb 12 04:04:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.