@@ -0,0 +1,1844 @@
+package org.fundacionjala.sevenwonders.routes;%0A%0Aimport org.apache.camel.BeanInject;%0Aimport org.apache.camel.model.rest.RestBindingMode;%0Aimport org.apache.camel.spring.SpringRouteBuilder;%0Aimport org.fundacionjala.sevenwonders.beans.GameRoomService;%0Aimport org.fundacionjala.sevenwonders.beans.GameService;%0Aimport org.fundacionjala.sevenwonders.core.GameBuilder;%0Aimport org.fundacionjala.sevenwonders.core.GameRoom;%0Aimport org.fundacionjala.sevenwonders.core.Player;%0Aimport org.fundacionjala.sevenwonders.core.Wonder;%0Aimport org.springframework.stereotype.Component;%0A%0A/**%0A * Created by Juan Manuel Barahona on 04/08/2016.%0A */%0A%0A@Component%0Apublic class GameRoomRoute extends SpringRouteBuilder %7B%0A%0A%0A    @BeanInject(%22gameRoomService%22)%0A    GameRoomService gameRoomService;%0A%0A%0A    @Override%0A    public void configure() throws Exception %7B%0A%0A%0A        restConfiguration().component(%22jetty%22)%0A                .bindingMode(RestBindingMode.json)%0A                .dataFormatProperty(%22prettyPrint%22, %22true%22)%0A                .port(9999);%0A%0A%0A        rest(%22/gameRoom%22).description(%22Lobby rest service%22)%0A                .consumes(%22application/json%22).produces(%22application/json%22)%0A%0A                .post().description(%22Create a new game room%22).type(org.fundacionjala.sevenwonders.core.rest.GameRoom.class)%0A                .to(%22bean:gameRoomService?method=createGameRoom%22)%0A%0A                .post(%22/player%22).description(%22Add Player to lobby game%22).type(Player.class)%0A                .to(%22bean:gameRoomService?method=addPlayer%22)%0A%0A                .get(%22/players/%7Bid%7D%22).description(%22Get list of players%22).outTypeList(Player.class)%0A                .to(%22bean:gameRoomService?method=getPlayers($%7Bheader.id%7D)%22)%0A%0A                .get(%22/%7Bid%7D%22).description(%22Get a game room%22).type(GameRoom.class)%0A                .to(%22bean:gameRoomService?method=getGameRoom($%7Bheader.id%7D)%22);%0A    %7D%0A%7D%0A

add gameroom rest routes