Revise implementation of delta tasks
(MAGNOLIA-5571)
|
|
| 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: |
|
||||||||
| 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: |
| 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. |
| 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!) |