public Integer getAbsoluteMarginWithDeadLine() {
return absoluteMarginWithDeadLine;
}
private void calculateAbsoluteMarginWithDeadLine() {
TaskElement rootTask = getRootTask();
Date deadline = currentOrder.getDeadline();
if (rootTask == null) {
throw new RuntimeException("Root task is null");
}
if (deadline == null) {
this.absoluteMarginWithDeadLine = null;
return;
}
absoluteMarginWithDeadLine = daysBetween(
TaskElement.maxDate(rootTask.getChildren()).asExclusiveEnd(),
LocalDate.fromDateFields(deadline).plusDays(1));
}