@Override
protected String getDegreeDescription() {
if (getDocumentRequest().isRequestForRegistration()) {
final StringBuilder res = new StringBuilder();
RegistryDiplomaRequest request = (RegistryDiplomaRequest) getDocumentRequest();
CycleType cycle = request.getRequestedCycle();
Degree degree = request.getDegree();
final DegreeType degreeType = request.getDegreeType();
if (degreeType.hasAnyCycleTypes()) {
res.append(cycle.getDescription(getLocale()));
res.append(" ").append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.of.both")).append(" ");
}
if (!degree.isEmpty()) {
res.append(degreeType.getFilteredName(getLocale()));
res.append(" ").append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.in")).append(" ");
}
res.append(degree.getNameI18N(request.getConclusionYear()).getContent(getLanguage()));
return res.toString();
} else if (getDocumentRequest().isRequestForPhd()) {
PhdRegistryDiplomaRequest request = (PhdRegistryDiplomaRequest) getDocumentRequest();
final StringBuilder res = new StringBuilder();
res.append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.phd.doctoral.program.designation"));
res.append(" ").append(BundleUtil.getString(Bundle.ACADEMIC, getLocale(), "label.in"));
res.append(" ").append(request.getPhdIndividualProgramProcess().getPhdProgram().getName().getContent(getLanguage()));
return res.toString();
}
throw new DomainException("docs.academicAdministrativeOffice.RegistryDiploma.degreeDescription.invalid.request");