@Path(value="user/{login}")
@Consumes(value="application/json")
@Produces(value="application/json")
public class UserResource
extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
PAGE_SIZE |
| Constructor and Description |
|---|
UserResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createStory(String login,
StoryDTO storyData)
Creates a Story
|
javax.ws.rs.core.Response |
getUserStories(String login,
int pageIndex)
Retrieves the stories created by a given user
|
protected es.uvigo.esei.dgss.teamc.microstories.entities.Story |
storyDTOToStory(StoryDTO storyData)
Convert a StoryDTO into a Story
|
javax.ws.rs.core.Response |
updateStory(String login,
Long id,
StoryDTO story) |
@GET
@Path(value="microstory")
public javax.ws.rs.core.Response getUserStories(@PathParam(value="login")
String login,
@QueryParam(value="page")
int pageIndex)
login - of the user to retrieve the storiespageIndex - page index to show the storiesOK response containing the list of stories created by the
given userSecurityException - when the user is not logged or the logged
user is different from the list authorIllegalArgumentException - when the given login is null@Path(value="microstory")
@POST
public javax.ws.rs.core.Response createStory(@PathParam(value="login")
String login,
StoryDTO storyData)
throws SecurityException
login - author of the StorystoryData - data of the storyCREATED response containing the uri to the storySecurityException - then user is not logged or the logged user
is different from the story authorIllegalArgumentException - when the story is null or already existsprotected es.uvigo.esei.dgss.teamc.microstories.entities.Story storyDTOToStory(StoryDTO storyData)
storyData - storyDTO to convert a StoryCopyright © 2022. All rights reserved.