@PUT
  @Path("own/{id}")
  @Consumes({MediaType.APPLICATION_JSON})
  @Produces({MediaType.APPLICATION_JSON})
  public String updateOwnedHardware(@PathParam("id") final Long id, final String JsonRequestBody) {

    CommandWrapper command =
        new CommandWrapperBuilder().updateOwnedHardware(id).withJson(JsonRequestBody).build();
    final CommandProcessingResult result =
        portfolioCommandSourceWritePlatformService.logCommandSource(command);
    return apiJsonSerializer.serialize(result);
  }
Пример #2
0
  @POST
  @Path("{chargCode}")
  @Consumes({MediaType.APPLICATION_JSON})
  @Produces({MediaType.APPLICATION_JSON})
  public String createTaxMap(
      @PathParam("chargeCode") final String chargeCode, final String jsonRequestBody) {

    final CommandWrapper command =
        new CommandWrapperBuilder().createTaxMap(chargeCode).withJson(jsonRequestBody).build();
    final CommandProcessingResult result =
        commandSourceWritePlatformService.logCommandSource(command);
    return apiJsonSerializer.serialize(result);
  }
Пример #3
0
  @PUT
  @Path("{taxMapId}")
  @Consumes({MediaType.APPLICATION_JSON})
  @Produces({MediaType.APPLICATION_JSON})
  public String updateTaxMapData(
      @PathParam("taxMapId") final Long taxMapId, final String jsonRequestBody) {

    context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
    final CommandWrapper commandRequest =
        new CommandWrapperBuilder().updateTaxMap(taxMapId).withJson(jsonRequestBody).build();
    final CommandProcessingResult result =
        commandSourceWritePlatformService.logCommandSource(commandRequest);
    return apiJsonSerializer.serialize(result);
  }