Rename method to reflect better is meaning

FEA: ItEr66OTS07PlanificacionHaciaAtrasItEr65OTS03
This commit is contained in:
Óscar González Fernández 2010-12-29 22:15:42 +01:00
parent be2b4b5f4d
commit a2e8c3ea2e
4 changed files with 10 additions and 7 deletions

View file

@ -514,7 +514,7 @@ public class Task extends TaskElement implements ITaskPositionConstrained {
}
setIntraDayEndDate(endDate);
updateWorkableDays();
doReassignment(getLastAllocationDirection());
doReassignment(getAllocationDirection());
}
private void updateWorkableDays() {
@ -623,7 +623,10 @@ public class Task extends TaskElement implements ITaskPositionConstrained {
}
}
public Direction getLastAllocationDirection() {
/**
* The allocation direction in which the allocation must be done
*/
public Direction getAllocationDirection() {
if (lastAllocationDirection == null) {
return Direction.FORWARD;
}
@ -632,7 +635,7 @@ public class Task extends TaskElement implements ITaskPositionConstrained {
public void reassignAllocationsWithNewResources(Scenario scenario,
IResourceDAO resourceDAO) {
reassign(scenario, getLastAllocationDirection(),
reassign(scenario, getAllocationDirection(),
new WithAnotherResources(resourceDAO));
}

View file

@ -894,7 +894,7 @@ public class TaskElementAdapter implements ITaskElementAdapter {
public List<Constraint<GanttDate>> getCurrentLengthConstraint() {
if (taskElement instanceof Task) {
Task task = (Task) taskElement;
if (task.getLastAllocationDirection() == Direction.FORWARD) {
if (task.getAllocationDirection() == Direction.FORWARD) {
return Collections
.singletonList(biggerOrEqualThan(getEndDate()));
}

View file

@ -198,7 +198,7 @@ public class AllocationResult {
}
private boolean isForwardsScheduled() {
return Direction.FORWARD.equals(task.getLastAllocationDirection());
return Direction.FORWARD.equals(task.getAllocationDirection());
}
public IntraDayDate getIntraDayStart() {

View file

@ -260,14 +260,14 @@ public class AllocationRowsHandler {
}
public boolean isForwardsAllocation() {
return Direction.FORWARD.equals(task.getLastAllocationDirection());
return Direction.FORWARD.equals(task.getAllocationDirection());
}
private void calculateEndDateOrStartDateAllocation() {
List<ResourcesPerDayModification> allocations = AllocationRow
.createAndAssociate(task, currentRows);
ResourceAllocation.allocating(allocations).untilAllocating(
task.getLastAllocationDirection(),
task.getAllocationDirection(),
formBinder.getAssignedHours(), notFullfiledReceiver());
}