Exemple #1
0
  @PermitAll
  @POST
  @Path("/clarificationbycontest")
  @Consumes("application/json")
  @Produces("application/json")
  /** @see clarificationDao.getClarificationsByContest(contest); */
  public List<Clarification> listClarifications(Contest contest) {
    ClarificationDAO clarificationDao = new ClarificationDAO();

    if (contest == null) return new ArrayList<Clarification>();

    return clarificationDao.getClarificationsByContest(contest);
  }
Exemple #2
0
 @PermitAll
 @GET
 @Path("/clarification/{idProblem}")
 @Consumes("application/json")
 @Produces("application/json")
 public List<Clarification> listClarificationByProblem(@PathParam("idProblem") Integer idProblem) {
   ClarificationDAO clarificationDao = new ClarificationDAO();
   try {
     return clarificationDao.getClarificationsByProblem(idProblem);
   } catch (ForCodeDataException fed) {
     logger.warn(fed);
     return null;
   }
 }