コード例 #1
0
  private void update(
      String client,
      ProgramProp programProp,
      HttpServletRequest request,
      HttpServletResponse response)
      throws IOException {

    programProp =
        Program.setSpecialInstruction(
            client, programProp.programId, ServletUtils.getStrParam(request, "specialInstruction"));

    List<String> batch1SessionTimings = new ArrayList<>();
    batch1SessionTimings.addAll(ServletUtils.getStringParamsAsSet(request, "batch1SessionTimings"));
    Collections.sort(batch1SessionTimings);

    programProp =
        Program.setSessionTimings(
            client, programProp.programId, batch1SessionTimings, null, null, null, null);

    programProp =
        Program.setMaxParticipants(
            client, programProp.programId, ServletUtils.getIntParam(request, "maxParticipants"));

    programProp =
        Program.setDisabled(
            client, programProp.programId, ServletUtils.getBoolParam(request, "disabled"));

    ServletUtils.setJson(response, new APIResponse().status(Status.SUCCESS).object(programProp));
  }