Revise implementation of delta tasks (MAGNOLIA-5571)

[MAGNOLIA-5643] Enhance implementation and naming of OrderNodeTo1stPosTask Created: 27/Jan/14  Updated: 27/Jan/14  Resolved: 27/Jan/14

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

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

Issue Links:
causality
is causing MGNLUI-2632 Do no longer use deprecated OrderNode... Closed
Template:
Date of First Response:

 Description   

That task should not retrieve the session from MgnlContext but from the installContext.

Also we try to avoid numbers and abbreviations in class names: hence OrderNodeTo1stPosTask should be replaced by OrderNodeToFirstPositionTask.

Lastly: there's no benefit in using a RepositoryTestCase to test such a task - in contrary, it's just much heavier/slower than an ordinary unit-test using MockSession.



 Comments   
Comment by Christoph Meier [ 27/Jan/14 ]

Review comment:
There is a new class - OrderNodeToFirstPositionTask - properly implemented with appropritate name; but the "old" class OrderNodeTo1stPosTask is still around and used.
Delete OrderNodeTo1stPosTask and use OrderNodeToFirstPositionTask instead.

Comment by Daniel Lipp [ 27/Jan/14 ]

Well - we have to be backwards compatible. We cannot delete types before they've been deprecated for a while.
The replacing of the usages of the old ones has to be on different tickets because it affects different modules (m_ui, stk, ...).

Comment by Milan Divilek [ 27/Jan/14 ]

But you should remove the old code from OrderNodeTo1stPosTask.java to avoid future problems caused by duplicate code. In that OrderNodeTo1stPosTask class there should stay constructors only, but they should point to new ones (OrderNodeToFirstPositionTask.java).

Comment by Daniel Lipp [ 27/Jan/14 ]

Only thing we can remove for now is the recently added convenience constructor (this task retrieves the jcr session from MgnlContext!)

Generated at Mon Feb 12 04:07:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.