ItEr31S12ValidacionEProbasFuncionaisItEr30S17: Adding method to move the start of a task and its allocations

This commit is contained in:
Óscar González Fernández 2009-10-19 23:28:42 +02:00
parent ef930e9009
commit 12aba8e4f5
4 changed files with 24 additions and 0 deletions

View file

@ -275,5 +275,10 @@ public class Task extends TaskElement {
}
}
@Override
protected void moveAllocations() {
}
}

View file

@ -139,6 +139,17 @@ public abstract class TaskElement extends BaseEntity {
this.startDate = startDate;
}
/**
* Sets the startDate to newStartDate. It can update the endDate
* @param newStartDate
*/
public void moveTo(Date newStartDate) {
this.startDate = newStartDate;
moveAllocations();
}
protected abstract void moveAllocations();
public Date getEndDate() {
return endDate;
}

View file

@ -168,4 +168,8 @@ public class TaskGroup extends TaskElement {
return result;
}
@Override
protected void moveAllocations() {
// do nothing
}
}

View file

@ -120,4 +120,8 @@ public class TaskMilestone extends TaskElement implements IValidable {
}
@Override
protected void moveAllocations() {
// do nothing
}
}