public ActionForward removePhdProgram(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    InstitutionPhdCandidacyPeriod phdCandidacyPeriod =
        (InstitutionPhdCandidacyPeriod) readPhdCandidacyPeriod(request);
    phdCandidacyPeriod.removePhdProgramInPeriod(readPhdProgram(request));

    return prepareEditPhdCandidacyPeriod(mapping, form, request, response);
  }
  public ActionForward addPhdProgram(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    PhdCandidacyPeriodBean phdCandidacyPeriodBean = readPhdCandidacyPeriodBean();
    InstitutionPhdCandidacyPeriod phdCandidacyPeriod =
        (InstitutionPhdCandidacyPeriod) readPhdCandidacyPeriod(request);

    phdCandidacyPeriod.addPhdProgramListToPeriod(phdCandidacyPeriodBean.getPhdProgramList());

    return prepareEditPhdCandidacyPeriod(mapping, form, request, response);
  }
  public ActionForward createPhdCandidacyPeriod(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    PhdCandidacyPeriodBean bean = readPhdCandidacyPeriodBean();

    switch (bean.getType()) {
      case EPFL:
        try {
          EPFLPhdCandidacyPeriod.create(bean);
          break;
        } catch (final DomainException e) {
          addActionMessage("error", request, e.getKey(), e.getArgs());
          return createPhdCandidacyPeriodInvalid(mapping, form, request, response);
        }
      case INSTITUTION:
        try {
          InstitutionPhdCandidacyPeriod.create(bean);
          break;
        } catch (final DomainException e) {
          addActionMessage("error", request, e.getKey(), e.getArgs());
          return createPhdCandidacyPeriodInvalid(mapping, form, request, response);
        }
      default:
        throw new DomainException("error.PhdCandidacyPeriodBean.type.missing");
    }

    return list(mapping, form, request, response);
  }