Tags:
create new tag
view all tags

ItEr74S07WBSTreeRefactoring

Story summary WBS tree refactoring
Iteration ItEr74week14To24
FEA ItEr74S07WBSTreeRefactoring
Story Lead  
Next Story  
Passed acceptance test No

Acceptance Criteria

Additional Specification Comments

Implementation Notes

Created a new test class called OrderElementTreeModelTest with tests for basic operations:

  • Add element
  • Remove element
  • Add advances on element
  • Add criteria on element

OrderElementTreeModel extends EntitiesTree (in the webapp module), and defines a method added which is called after some element is added to the tree. The implementation for this method calls to updateCriterionRequirementsInHierarchy method which finally calls to OrderElement::updateCriterionRequirements (in business).

Which means that OrderElementTreeModel is taking care of some business logic and it shouldn't. So, method EntitiesTree::added is removed. We need to still keep calling to OrderElement::updateCriterionRequirements at some point, but in the business module (that should be in charge of this logic).

In the business part there're an interface called ITreeParentNode implemented by TreeNodeOnList (with all the basic behaviour for operations) and defining some abstract methods onChildAdded and onChildRevomed. TreeNodeOnList is extended by TreeNodeOnListWithSchedulingState (in charge of keep scheduling state with proper values) which defines a method onChildRevomedAditionalActions. This method is overridden at ChildrenManipulator class inside OrderLineGroup.

Then I added a new onChildAddedAditionalActions in TreeNodeOnListWithSchedulingState to take care of update criteria.

All the business logic related with entities used in OrderElement (like criteria, advances, ...) when some element is added or removed should be controlled by these 2 methods in ChildrenManipulator:

  • onChildAddedAditionalActions
  • onChildRemovedAditionalActions

-- ManuelRego - 19 Apr 2011

We will need to do some refactorization to use the same methods in all the cases. Moreover, templates part is broken as it has a particular implementation that should be reused when possible.

For the moment I've been adding more and more tests to OrderElementTreeModelTest and patching current implementation to make it works.

-- ManuelRego - 04 May 2011

Delay Causes

Final or Pending Considerations

Commits

%RPSHOWGITCOMMITS%

Tasks in this story

Total Hours in this Story

%RPSHOWTOTALHOURS%


Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 19 Jun 2011 - mrego
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback