@Path(value="/private/user") @Consumes(value="application/json") @Produces(value="application/json") public class UserPrivateRest extends Object
User private funcionalities| Constructor and Description |
|---|
UserPrivateRest() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getEventsCreatedByUser(String userLogin)
Returns the
Event created by the current User |
javax.ws.rs.core.Response |
getEventsJoinedByUser(String userLogin,
int start,
int count)
Returns the
Event joined by the current User sorted by
descending Date |
javax.ws.rs.core.Response |
joinEvent(String userLogin,
int eventId)
Allows the current
User to join into an Event |
@GET
@Path(value="{login}/joined")
public javax.ws.rs.core.Response getEventsJoinedByUser(@PathParam(value="login")
String userLogin,
@QueryParam(value="start") @DefaultValue(value="1")
int start,
@QueryParam(value="count") @DefaultValue(value="20")
int count)
Event joined by the current User sorted by
descending DateuserLogin - Login of the Userstart - Index of the list of Event where you want to start the
list. If not set, it will be defaulted to the first elementcount - Number of Event asked for retrieved. If not set, it
will be defaulted to twentyOK HTTP response containing the list of events or a
response with no content if the login doesn't match with the
logged user@GET
@Path(value="{login}/created")
public javax.ws.rs.core.Response getEventsCreatedByUser(@PathParam(value="login")
String userLogin)
Event created by the current UseruserLogin - Login of the UserOK HTTP response containing the list of events or a
response with no content if the login doesn't match with the
logged user@POST
@Path(value="{login}/join")
public javax.ws.rs.core.Response joinEvent(@PathParam(value="login")
String userLogin,
int eventId)
throws SecurityException,
es.uvigo.esei.dgss.letta.service.util.exceptions.EventAlredyJoinedException
User to join into an EventuserLogin - Login of the UsereventId - Unique identifier of an EventOK HTTP response or a response with no content if the
login doesn't match with the logged userSecurityException - If the User logged login doesn't match with the login
sentes.uvigo.esei.dgss.letta.service.util.exceptions.EventAlredyJoinedException - If the User is already register for the event.Copyright © 2015. All rights reserved.