code: @POST
      @Consumes(MediaType.APPLICATION_JSON)
      @Produces(MediaType.APPLICATION_JSON)
      @RequiresPermissions(I18nPermissions.LOCALE_WRITE)
      public Response addAvailableLocale(LocaleRepresentation representation,
              @Context UriInfo uriInfo) throws URISyntaxException {
          WebAssertions.assertNotNull(representation, LOCALE_SHOULD_NOT_BE_BLANK);
  
          Locale result;
          if (!localeRepository.contains(representation.getCode())) {
              result = factory.createFromCode(representation.getCode());
              localeRepository.add(result);
          } else {
              return Response.status(Response.Status.CONFLICT).build();
          }
  
          return Response.created(new URI(uriInfo.getRequestUri() + "/" + result.getId()))
                  .entity(localeFinder.findAvailableLocale(result.getId())).build();
      }
docs: Inserts an available locale.
  
  @param representation locale representation
  @param uriInfo        uriInfo
  @return status code 201 if created, or 409 (conflict) if the locale already exist.
  @throws java.net.URISyntaxException if URI is not valid