if (bean == null) {
return chooseExport(mapping, form, request, response);
}
final AcademicInterval executionYear = bean.getExecutionYear().getAcademicInterval();
final EntryPhase phase = bean.getEntryPhase();
final List<Degree> degrees =
Degree.readAllByDegreeType(DegreeType.BOLONHA_DEGREE, DegreeType.BOLONHA_INTEGRATED_MASTER_DEGREE);
if (executionYear == null) {
return chooseExport(mapping, form, request, response);
}
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "attachment; filename=occupationMap_"
+ executionYear.getPresentationName().replace('/', '_') + " " + phase.getLocalizedName() + ".xls");
final Spreadsheet spreadsheet = new Spreadsheet("Shifts");
addHeader(spreadsheet, phase);
for (Degree degree : degrees) {