import pt.utl.ist.fenix.tools.util.i18n.MultiLanguageString;
public class FormationManagement {
protected AcademicalInstitutionUnit getFormationInstitution(final AlumniFormation formation) {
AcademicalInstitutionUnit institutionUnit = formation.getInstitution();
if (institutionUnit == null
&& formation.getInstitutionType() != null
&& (formation.getInstitutionType().equals(AcademicalInstitutionType.FOREIGN_INSTITUTION) || formation
.getInstitutionType().equals(AcademicalInstitutionType.OTHER_INSTITUTION))) {
if (!StringUtils.isEmpty(formation.getForeignUnit())) {
institutionUnit =
UniversityUnit.createNewUniversityUnit(new MultiLanguageString(formation.getForeignUnit()), null, null,
null, new YearMonthDay(), null, getParentUnit(formation), null, null, false, null);
institutionUnit.setInstitutionType(formation.getInstitutionType());
}
}
return institutionUnit;
}