Beispiel #1
0
  private void processJsonDataItems(
      List<EmployeePlan> employeePlans,
      List<EmployeeProjectPlan> employeeProjectPlans,
      JsonRootNode rootNode,
      Integer year,
      Integer month) {
    Integer employeeId;

    for (JsonNode jsonNode : rootNode.getArrayNode(JSON_DATA_ITEMS)) {
      employeeId = JsonUtil.getDecNumberValue(jsonNode, EMPLOYEE_ID);

      final Employee employee = employeeService.find(employeeId);

      addEmployeePlans(employeePlans, year, month, employee, jsonNode);

      addEmployeeProjectPlans(employeeProjectPlans, year, month, employee, jsonNode);
    }
  }
  public static WorldTemplateList func_110735_a(String par0Str) {
    WorldTemplateList worldtemplatelist = new WorldTemplateList();
    worldtemplatelist.field_110736_a = new ArrayList();

    try {
      JsonRootNode jsonrootnode = (new JdomParser()).parse(par0Str);

      if (jsonrootnode.isArrayNode(new Object[] {"templates"})) {
        Iterator iterator = jsonrootnode.getArrayNode(new Object[] {"templates"}).iterator();

        while (iterator.hasNext()) {
          JsonNode jsonnode = (JsonNode) iterator.next();
          worldtemplatelist.field_110736_a.add(WorldTemplate.func_110730_a(jsonnode));
        }
      }
    } catch (InvalidSyntaxException invalidsyntaxexception) {;
    } catch (IllegalArgumentException illegalargumentexception) {;
    }

    return worldtemplatelist;
  }