-
Notifications
You must be signed in to change notification settings - Fork 0
AnA05S09RefactoringWorkReportWS
TWiki>
LibrePlan Web>AnA05S09RefactoringWorkReportWS (03 Jan 2012, JavierMoran)EditAttach
| Story summary | Refactoring Work Report WS |
| Iteration | AnA04Architecture |
| FEA | AnA05S09RefactoringWorkReportWS |
| Story Lead | |
| Next Story | |
| Passed acceptance test | No |
This task consists of modifying the work report service to allow to look for the set of OrderElement associated with a WorkReportLine.
First it will be created a new interface called IWorkReportsElements that is going to be implemented by WorkReport and WorkReportLine. This interface will have the following methods:
* Date getDate & setDate
* Resource getResource & setResource
* OrderElement getOrderElement & setOrderElement
* Set<Label> getLabels & setLabels
* Set<DescriptionValue> getDescriptionValues & setDescriptionValues
We're going to create a new interface called IWorkReportDTOsElements with the same methods than before but returning different values:
* XMLGregorianCalendar getDate & setDate
* String getResource & setResource
* String getOrderElement & setOrderElement
* Set<LabelReferenceDTO> getLabels & setLabels
* Set<DescriptionValueDTO> getDescriptionValues & setDescriptionValues
Then it will be created an interface called IBindingOrderElementStrategy with these methods:
* List<OrderElement> getOrderElementsBound(IWorkReportDTOsElements workReportDTO) throws ValidationException;
* String getOrderElementCodesBound(IWorkReportsElements workReportEntity);
* void assignOrderElementsToWorkReportLine(IWorkReportsElements workReportEntity, List<OrderElement> list) throws ValidationException;
It will be developed a default implementation (example name OneOrderElementPerWorkReportLine) with the following features:
- It will look for the orderelement using the code (
externalCode is only used in subcontracting system) of the work report line related to the order line. - The method
assignOrderElementsToWorkReportLinewill throw a ValidationException if the list is empty or if it has more than 1 element.
It is needed to modify the converter org.navalplanner.ws.workreports.impl.WorkReportConverter in four places because the OrderElement specification can come probably both in the WorkReport heading and in the WorkReportLine.
Use this specification as a guide and feel free to design at implementation level. Use this
| Tasks | Est | Spent | To do | Risk | Reviewer | Developer | Task Name | Start Date | Est End Date | End Date |
|---|---|---|---|---|---|---|---|---|---|---|
| Task | 3 | 3 | 0 | Low | JavierMoran | IgnacioDiaz CristinaAlvarino | Abstract strategy to associate order element |
| User | Spent in XpTracker | Spent in phpReport | Ok? |
|---|---|---|---|
| IgnacioDiaz CristinaAlvarino | 3 | 0 | ![]() |
| Total | 3 | 0 | ![]() |
Copyright (c) by the contributing authors. All material on this collaboration platform is the property of the contributing authors.