ItEr58S14RecalculosConexionEscenariosItEr57S15: Let create a IDependenciesEnforcerHook without specifying a notificator.
A default one is specified. It does nothing.
This commit is contained in:
parent
6cb780d95c
commit
123103ed2e
1 changed files with 19 additions and 0 deletions
|
|
@ -392,6 +392,8 @@ public class GanttDiagramGraph<V, D> {
|
|||
public interface IDependenciesEnforcerHookFactory<T> {
|
||||
public IDependenciesEnforcerHook create(T task,
|
||||
INotificationAfterDependenciesEnforcement notification);
|
||||
|
||||
public IDependenciesEnforcerHook create(T task);
|
||||
}
|
||||
|
||||
public interface INotificationAfterDependenciesEnforcement {
|
||||
|
|
@ -401,6 +403,18 @@ public class GanttDiagramGraph<V, D> {
|
|||
public void onLengthChange(long previousLength, long newLength);
|
||||
}
|
||||
|
||||
private static final INotificationAfterDependenciesEnforcement EMPTY_NOTIFICATOR = new INotificationAfterDependenciesEnforcement() {
|
||||
|
||||
@Override
|
||||
public void onStartDateChange(Date previousStart, long previousLength,
|
||||
Date newStart) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLengthChange(long previousLength, long newLength) {
|
||||
}
|
||||
};
|
||||
|
||||
public class DeferedNotifier {
|
||||
|
||||
private Map<V, NotificationPendingForTask> notificationsPending = new LinkedHashMap<V, NotificationPendingForTask>();
|
||||
|
|
@ -526,6 +540,11 @@ public class GanttDiagramGraph<V, D> {
|
|||
onNotification(task, notificator));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDependenciesEnforcerHook create(V task) {
|
||||
return create(task, EMPTY_NOTIFICATOR);
|
||||
}
|
||||
|
||||
private IDependenciesEnforcerHook onEntrance(final V task) {
|
||||
return new IDependenciesEnforcerHook() {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue