ItEr31S12ValidacionEProbasFuncionaisItEr30S17: Adding method to move the start of a task and its allocations
This commit is contained in:
parent
ef930e9009
commit
12aba8e4f5
4 changed files with 24 additions and 0 deletions
|
|
@ -275,5 +275,10 @@ public class Task extends TaskElement {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void moveAllocations() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,4 +168,8 @@ public class TaskGroup extends TaskElement {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void moveAllocations() {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,4 +120,8 @@ public class TaskMilestone extends TaskElement implements IValidable {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void moveAllocations() {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue