}
}
}
public boolean isGreenLight() {
Dependencies deps = getDependencies(toBeDeleted);
boolean greenLight;
try {
greenLight = true;
if (!deps.isEmpty()) {
greenLight = confirmSave(deps);
}
if (greenLight) {
collectEntitiesToSave(deps);
collectAllItemsThatWillBeDeleted(deps);
WizardItemDeleteChecker wim = new WizardItemDeleteChecker(allItemsThatWillBeDeleted, deps);
greenLight = wim.isGreenlighted();
if (greenLight) {
orphansToDelete = wim.getOrphansToDelete();
}
}
} finally {
deps.dispose();
}
return greenLight;
}