public static List buildExecutionDegreeLabelValueBean(List executionDegreeList, MessageResources messageResources,
HttpServletRequest request) {
List executionDegreeLabels = new ArrayList();
Iterator iterator = executionDegreeList.iterator();
while (iterator.hasNext()) {
InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree) iterator.next();
String name = infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getNome();
String degreeType = null;
if (messageResources != null) {
final Locale locale = I18N.getLocale();
degreeType =
messageResources.getMessage(locale, infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree()
.getDegreeType().name());
}
if (degreeType == null) {
degreeType = infoExecutionDegree.getInfoDegreeCurricularPlan().getInfoDegree().getDegreeType().toString();
}
name = degreeType + " em " + name;
name +=
duplicateInfoDegree(executionDegreeList, infoExecutionDegree) ? " - "
+ infoExecutionDegree.getInfoDegreeCurricularPlan().getName() : "";
executionDegreeLabels.add(new LabelValueBean(name, infoExecutionDegree.getExternalId().toString()));
}
return executionDegreeLabels;
}