ItEr31S12ValidacionEProbasFuncionaisItEr30S17: Moving and making public method so it can be reused.
This commit is contained in:
parent
12aba8e4f5
commit
1cf2283f42
2 changed files with 10 additions and 10 deletions
|
|
@ -61,4 +61,13 @@ public class ResourceAllocationWithDesiredResourcesPerDay {
|
|||
public ResourcesPerDay getResourcesPerDay() {
|
||||
return resourcesPerDay;
|
||||
}
|
||||
|
||||
public static List<ResourceAllocation<?>> stripResourcesPerDay(
|
||||
List<ResourceAllocationWithDesiredResourcesPerDay> withResourcesPerDay) {
|
||||
List<ResourceAllocation<?>> result = new ArrayList<ResourceAllocation<?>>();
|
||||
for (ResourceAllocationWithDesiredResourcesPerDay r : withResourcesPerDay) {
|
||||
result.add(r.getResourceAllocation());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -202,7 +202,7 @@ public class ResourceAllocationsBeingEdited {
|
|||
}
|
||||
return new AllocationResult(task, calculatedValue,
|
||||
new AggregateOfResourceAllocations(
|
||||
stripResourcesPerDay(allocations)), daysDuration,
|
||||
ResourceAllocationWithDesiredResourcesPerDay.stripResourcesPerDay(allocations)), daysDuration,
|
||||
fromDetachedToAttached);
|
||||
}
|
||||
|
||||
|
|
@ -241,15 +241,6 @@ public class ResourceAllocationsBeingEdited {
|
|||
return Days.daysBetween(start, end).getDays();
|
||||
}
|
||||
|
||||
private List<ResourceAllocation<?>> stripResourcesPerDay(
|
||||
List<ResourceAllocationWithDesiredResourcesPerDay> withResourcesPerDay) {
|
||||
List<ResourceAllocation<?>> result = new ArrayList<ResourceAllocation<?>>();
|
||||
for (ResourceAllocationWithDesiredResourcesPerDay r : withResourcesPerDay) {
|
||||
result.add(r.getResourceAllocation());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private ResourceAllocation<?> createAllocation(AllocationDTO allocation) {
|
||||
if (allocation instanceof SpecificAllocationDTO) {
|
||||
SpecificAllocationDTO specific = (SpecificAllocationDTO) allocation;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue