item.setId(task.getId());
item.setName(task.getName());
item.setStatus(task.getTaskState().toString());
item.setReadableStatus(getReadableState(task.getTaskState()));
item.setTypeId(task.getType());
ScheduledTaskDescriptor descriptor =
getNexusConfiguration().getScheduledTaskDescriptor(task.getType());
if (descriptor != null) {
item.setTypeName(descriptor.getName());
}
item.setCreated(task.getScheduledAt() == null ? "n/a" : task.getScheduledAt().toString());
item.setLastRunTime(task.getLastRun() == null ? "n/a" : task.getLastRun().toString());
final Date nextRunTime = getNextRunTime(task);
item.setNextRunTime(nextRunTime == null ? "n/a" : nextRunTime.toString());