@@ -0,0 +1,924 @@
+package ch.sportchef.business.event.boundary;%0A%0Aimport ch.sportchef.business.event.entity.Event;%0A%0Aimport javax.ejb.Stateless;%0Aimport javax.inject.Inject;%0Aimport javax.validation.Valid;%0Aimport javax.ws.rs.POST;%0Aimport javax.ws.rs.Path;%0Aimport javax.ws.rs.Produces;%0Aimport javax.ws.rs.core.Context;%0Aimport javax.ws.rs.core.MediaType;%0Aimport javax.ws.rs.core.Response;%0Aimport javax.ws.rs.core.UriInfo;%0Aimport java.net.URI;%0A%0A@Stateless%0A@Path(%22events%22)%0A@Produces(%7BMediaType.APPLICATION_JSON, MediaType.APPLICATION_XML%7D)%0Apublic class EventsResource %7B%0A%0A    @Inject%0A    private EventManager manager;%0A%0A    @POST%0A    public Response save(@Valid final Event event, @Context final UriInfo info) %7B%0A        final Event saved = this.manager.save(event);%0A        final long eventId = saved.getEventId();%0A        final URI uri = info.getAbsolutePathBuilder().path(%22/%22 + eventId).build();%0A        return Response.created(uri).build();%0A    %7D%0A%7D%0A

create the REST resource