components/src/test/java/eu/internetofus/common/components/personal_context_builder/WeNetPersonalContextBuilderSimulatorMocker.java
/**
   * Handler for post a new location for an user.
   *
   * @return the handler to manage an users locations.
   */
Handler for post a new location for an user.
@return the handler to manage an users locations.
Handler for post a new location for an user . @return the handler to manage an users locations .
protected Handler<RoutingContext> createDeleteLocationHandler() {
    return ctx -> {
      final var id = ctx.pathParam("id");
      final var max = this.locations.size();
      for (var i = 0; i < max; i++) {
        final var location = this.locations.get(i);
        if (location.userId.equals(id)) {
          this.locations.remove(i);
          break;
        }
      }
      final var response = ctx.response();
      response.setStatusCode(Status.NO_CONTENT.getStatusCode());
      response.end();
    };
  }
protected Handler < RoutingContext > createDeleteLocationHandler ( ) { return ctx -> { final var id = ctx . pathParam ( "id" ) ; final var max = this . locations . size ( ) ; for ( var i = 0 ; i < max ; i ++ ) { final var location = this . locations . get ( i ) ; if ( location . userId . equals ( id ) ) { this . locations . remove ( i ) ; break ; } } final var response = ctx . response ( ) ; response . setStatusCode ( Status . NO_CONTENT . getStatusCode ( ) ) ; response . end ( ) ; } ; }
Handler for post a new location for an user.
Handler for post a new location for an user .