@Path(value="event") @Consumes(value="application/json") @Produces(value="application/json") public class EventResource extends Object
| Constructor and Description |
|---|
EventResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
attendToEvent(int eventID) |
javax.ws.rs.core.Response |
createEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Creates a new event.
|
javax.ws.rs.core.Response |
deletePost(int id) |
javax.ws.rs.core.Response |
getEvent(javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.Response |
getFollowEvents() |
javax.ws.rs.core.Response |
getMyEvents() |
javax.ws.rs.core.Response |
getTopEvents() |
javax.ws.rs.core.Response |
getWallEvents() |
javax.ws.rs.core.Response |
search(String searchTerm) |
javax.ws.rs.core.Response |
updateEventByCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Update event by creator.
|
@GET @Path(value="top") public javax.ws.rs.core.Response getTopEvents()
@GET @Path(value="wall") public javax.ws.rs.core.Response getWallEvents()
@GET @Path(value="myevents") public javax.ws.rs.core.Response getMyEvents()
@GET @Path(value="follow") public javax.ws.rs.core.Response getFollowEvents()
@GET
@Path(value="{eventId}/requests")
public javax.ws.rs.core.Response attendToEvent(@PathParam(value="eventId")
int eventID)
eventID - id of event to be attended@GET
@Path(value="{eventId}")
public javax.ws.rs.core.Response getEvent(@Context
javax.ws.rs.core.UriInfo uriInfo)
uriInfo - he identifier of the event to be returned@POST
public javax.ws.rs.core.Response createEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws IllegalArgumentException
event - the new Event.CREATED response with the URI of the new event in the
Location header.IllegalArgumentException - if the event is null or the event data is bad.@GET @Path(value="search") public javax.ws.rs.core.Response search(String searchTerm)
searchTerm - the search term used.@PUT
@Path(value="{eventId}")
public javax.ws.rs.core.Response updateEventByCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws IllegalArgumentException
event - the update Event.UPDATED response with the URI of the update event in the
Location header.IllegalArgumentException - if the event is null or the event data is bad.@DELETE
@Path(value="{id}/delete")
public javax.ws.rs.core.Response deletePost(@PathParam(value="id")
int id)
id - id of event to deleteCopyright © 2017. All rights reserved.