@Path(value="microstory") @Produces(value="application/json") @Consumes(value="application/json") public class StoryResource extends Object
Story entity, containing the business logic
needed to handle REST operations for the resource.| Constructor and Description |
|---|
StoryResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createStory(StoryCreationDto story) |
javax.ws.rs.core.Response |
exploreHottestStories() |
javax.ws.rs.core.Response |
getStoryById(int id) |
javax.ws.rs.core.Response |
recentStories() |
javax.ws.rs.core.Response |
searchOrExploreStories(es.uvigo.esei.dgss.teamB.microstories.domain.Genre genre,
es.uvigo.esei.dgss.teamB.microstories.domain.Topic topic,
String publication,
String text,
int page,
int maxItems) |
javax.ws.rs.core.Response |
updateStory(int id,
StoryUpdateDto story) |
@GET @Path(value="/recent") public javax.ws.rs.core.Response recentStories()
@GET
@Path(value="/{id}")
public javax.ws.rs.core.Response getStoryById(@PathParam(value="id")
int id)
@GET @Path(value="/hottest") public javax.ws.rs.core.Response exploreHottestStories()
@GET
public javax.ws.rs.core.Response searchOrExploreStories(@QueryParam(value="genre")
es.uvigo.esei.dgss.teamB.microstories.domain.Genre genre,
@QueryParam(value="topic")
es.uvigo.esei.dgss.teamB.microstories.domain.Topic topic,
@QueryParam(value="publication")
String publication,
@QueryParam(value="contains")
String text,
@QueryParam(value="page")
int page,
@QueryParam(value="maxItems")
int maxItems)
@POST public javax.ws.rs.core.Response createStory(StoryCreationDto story)
@PUT
@Path(value="/{id}")
public javax.ws.rs.core.Response updateStory(@PathParam(value="id")
int id,
StoryUpdateDto story)
Copyright © 2021. All rights reserved.