@Path(value="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 |
acceptFriendRequest(String userLogin,
String friendLogin)
Accepts friend requests
|
javax.ws.rs.core.Response |
cancelFriendRequest(String userLogin,
String friendLogin)
Cancels friend requests
|
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 |
rejectFriendRequest(String userLogin,
String friendLogin)
Rejects friend requests
|
javax.ws.rs.core.Response |
removeFriendship(String userLogin,
String friendLogin)
Remove friendship
|
javax.ws.rs.core.Response |
searchForAnUser(String userLogin,
String keyword) |
javax.ws.rs.core.Response |
sendFriendRequest(String userLogin,
String friendLogin)
Sends friend requests
|
@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}/sendRequest/{friendLogin}")
public javax.ws.rs.core.Response sendFriendRequest(@PathParam(value="login")
String userLogin,
@PathParam(value="friendLogin")
String friendLogin)
throws IllegalArgumentException,
SecurityException
userLogin - the login if UserfriendLogin - the login of friend's UserOK HTTP responseIllegalArgumentException - if the provided parameters are not valid.SecurityException - if the user does not have permission.@POST
@Path(value="{login}/cancelRequest/{friendLogin}")
public javax.ws.rs.core.Response cancelFriendRequest(@PathParam(value="login")
String userLogin,
@PathParam(value="friendLogin")
String friendLogin)
throws IllegalArgumentException,
SecurityException
userLogin - the login if UserfriendLogin - the login of friend's UserOK HTTP responseIllegalArgumentException - if the provided parameters are not valid.SecurityException - if the user does not have permission.@PUT
@Path(value="{login}/acceptRequest/{friendLogin}")
public javax.ws.rs.core.Response acceptFriendRequest(@PathParam(value="login")
String userLogin,
@PathParam(value="friendLogin")
String friendLogin)
throws IllegalArgumentException,
SecurityException
userLogin - the login if UserfriendLogin - the login of friend's UserOK HTTP responseIllegalArgumentException - if the provided parameters are not valid.SecurityException - if the user does not have permission.@PUT
@Path(value="{login}/rejectRequest/{friendLogin}")
public javax.ws.rs.core.Response rejectFriendRequest(@PathParam(value="login")
String userLogin,
@PathParam(value="friendLogin")
String friendLogin)
throws IllegalArgumentException,
SecurityException
userLogin - the login if UserfriendLogin - the login of friend's UserOK HTTP responseIllegalArgumentException - if the provided parameters are not valid.SecurityException - if the user does not have permission.@DELETE
@Path(value="{login}/removeFriendship/{friendLogin}")
public javax.ws.rs.core.Response removeFriendship(@PathParam(value="login")
String userLogin,
@PathParam(value="friendLogin")
String friendLogin)
throws IllegalArgumentException,
SecurityException
userLogin - the login if UserfriendLogin - the login of friend's UserOK HTTP responseIllegalArgumentException - if the provided parameters are not valid.SecurityException - if the user does not have permission.Copyright © 2017. All rights reserved.