create new tag
view all tags


Story summary Refactoring Work Report WS
Iteration AnA04Architecture
FEA AnA05S09RefactoringWorkReportWS
Story Lead  
Next Story  
Passed acceptance test No


Abstract strategy to associate order element

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 (ALERT! externalCode is only used in subcontracting system) of the work report line related to the order line.
  • The method assignOrderElementsToWorkReportLine will 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.

Warning, important Use this specification as a guide and feel free to design at implementation level. Use this

User stories

Tasks in this story

Total Hours in this Story


Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 03 Jan 2012 - jmoran
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