Ejemplo n.º 1
0
 public void add(DistStageDto stage) {
   int rowCount = distStages.insert(stage);
   if (rowCount == 0) {
     LOGGER.error("Bad user input: " + stage);
     throw new UnexpectedInputException(Messages.ERR_BAD_USER_INPUT.getText());
   }
 }
Ejemplo n.º 2
0
 public void replace(long id, DistStageDto stage) {
   int rowCount = distStages.updateById(id, stage);
   if (rowCount == 0) {
     LOGGER.error("Bad user input: id: " + id + ", platform: " + stage);
     throw new UnexpectedInputException(Messages.ERR_BAD_USER_INPUT.getText());
   }
 }
Ejemplo n.º 3
0
  public DistStageDto parseDistStage(Map<String, Object> stageAnswers) {
    DistStageDto stage = new DistStageDto(stageAnswers);
    if (stage.isEmpty()) {
      LOGGER.error("Bad user input: unparsable distStage input: " + stageAnswers);
      throw new UnexpectedInputException(Messages.ERR_BAD_USER_INPUT.getText());
    }

    return stage;
  }