@Path(value="/private/user") @Consumes(value="application/json") @Produces(value="application/json") public class UserResource extends Object
User private funcionalities| Constructor and Description |
|---|
UserResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createEvent(String userLogin,
es.uvigo.esei.dgss.letta.domain.entities.Event event)
Creates an
Event |
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 |
javax.ws.rs.core.Response |
modifyEvent(String userLogin,
es.uvigo.esei.dgss.letta.domain.entities.Event event)
Modifies an
Event |
@GET
@Path(value="{login}/joined")
public javax.ws.rs.core.Response getEventsJoinedByUser(@PathParam(value="login")
String userLogin,
@QueryParam(value="start") @DefaultValue(value="0")
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}/joined/{id}")
@Consumes(value="*/*")
public javax.ws.rs.core.Response joinEvent(@PathParam(value="login")
String userLogin,
@PathParam(value="id")
int eventId)
throws SecurityException,
es.uvigo.esei.dgss.letta.service.util.exceptions.EventAlredyJoinedException,
es.uvigo.esei.dgss.letta.service.util.exceptions.EventIsCancelledException
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.es.uvigo.esei.dgss.letta.service.util.exceptions.EventIsCancelledException - If the Event is cancelled@POST
@Path(value="{login}/create")
public javax.ws.rs.core.Response createEvent(@PathParam(value="login")
String userLogin,
es.uvigo.esei.dgss.letta.domain.entities.Event event)
throws SecurityException
EventuserLogin - indicates the owner loginevent - indicates the new EventCREATED response with the URI of the new event in the
Location header.SecurityException - If the User logged login doesn't match with the login
sent@PUT
@Path(value="{login}/modify")
public javax.ws.rs.core.Response modifyEvent(@PathParam(value="login")
String userLogin,
es.uvigo.esei.dgss.letta.domain.entities.Event event)
throws SecurityException,
IllegalArgumentException,
es.uvigo.esei.dgss.letta.service.util.exceptions.UserNotAuthorizedException
EventuserLogin - indicates the owner loginevent - indicates the modified 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.UserNotAuthorizedException - If the User is not the ownerIllegalArgumentException - If the Event does not existsCopyright © 2015. All rights reserved.