private void getEVModel() throws TinyCGIException {
taskListName = settings.getTaskListName();
if (taskListName == null)
throw new TinyCGIException(400, "schedule name missing");
else if (FAKE_MODEL_NAME.equals(taskListName)) {
evModel = null;
return;
}
long now = System.currentTimeMillis();
synchronized (EVReport.class) {
if (drawingChart &&
(now - lastRecalcTime < MAX_DELAY) &&
taskListName.equals(lastTaskListName)) {
evModel = lastEVModel.get();
if (evModel != null)
return;
}
}
evModel = EVTaskList.openExisting
(taskListName,
getDataRepository(),
getPSPProperties(),
getObjectCache(),
false); // change notification not required
if (evModel == null)
throw new TinyCGIException(404, "Not Found",
"No such task/schedule");
EVDependencyCalculator depCalc = new EVDependencyCalculator(
getDataRepository(), getPSPProperties(), getObjectCache());
evModel.setDependencyCalculator(depCalc);