6,6 → 6,8 |
import org.apache.struts.action.ActionMapping; |
import pt.estgp.estgweb.domain.views.CourseView; |
import pt.estgp.estgweb.filters.exceptions.NotFoundException; |
import pt.estgp.estgweb.services.courses.xsd.Curso; |
import pt.estgp.estgweb.services.courses.xsd.UnidadeImpl; |
import pt.estgp.estgweb.services.courseunits.DirectedCoordinatedCourses; |
import pt.estgp.estgweb.services.courseunits.DirectedCoordinatedUnitsService; |
import pt.estgp.estgweb.services.expceptions.AlreadyExistsException; |
532,8 → 534,63 |
} |
} |
|
public ActionForward addUnidadePerfil(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
try |
{ |
CourseStudiesPlansAdminForm frm = (CourseStudiesPlansAdminForm) form; |
String perfilId = frm.getPerfilId(); |
for(Curso.Semestre semestre: frm.getPlanoEstudos().getSemestre()){ |
for(Curso.Semestre.Perfil perfil: semestre.getPerfil()) |
{ |
if(perfil.getPerfilId().equals(perfilId)) |
{ |
perfil.getUnidade().add(new UnidadeImpl()); |
break; |
} |
} |
} |
return mapping.findForward("editStudyPlan"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
return mapping.findForward("error500"); |
} |
} |
public ActionForward addUnidadeSemestre(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
try |
{ |
CourseStudiesPlansAdminForm frm = (CourseStudiesPlansAdminForm) form; |
String semestreId = frm.getSemestreId(); |
for(Curso.Semestre semestre: frm.getPlanoEstudos().getSemestre()) |
{ |
if(semestre.getSemestreId().equals(semestreId)) |
{ |
semestre.getUnidade().add(new UnidadeImpl()); |
break; |
} |
} |
return mapping.findForward("editStudyPlan"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
return mapping.findForward("error500"); |
} |
} |
|
|
|
|
|
} |