@Path(value="microstory") @Consumes(value="application/json") @Produces(value="application/json") public class StoryResource extends Object
| Constructor and Description |
|---|
StoryResource() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
createStory(es.uvigo.esei.dgss.teama.microstories.domain.entities.Story story) |
javax.ws.rs.core.Response |
delete(int id) |
javax.ws.rs.core.Response |
get(int id) |
javax.ws.rs.core.Response |
listMostReadedStories(String initialDateStr,
String finalDateStr) |
javax.ws.rs.core.Response |
listRecent() |
javax.ws.rs.core.Response |
listStories(int maxItems,
int page,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Topic genre,
es.uvigo.esei.dgss.teama.microstories.domain.entities.Type theme,
long publication) |
javax.ws.rs.core.Response |
searchStorieByText(String contains,
int page,
int maxItems) |
javax.ws.rs.core.Response |
update(es.uvigo.esei.dgss.teama.microstories.domain.entities.Story updateStory,
int id) |
@Path(value="{id}")
@GET
public javax.ws.rs.core.Response get(@PathParam(value="id")
int id)
@Path(value="{id}")
@PUT
@Consumes(value="application/json")
public javax.ws.rs.core.Response update(es.uvigo.esei.dgss.teama.microstories.domain.entities.Story updateStory,
@PathParam(value="id")
int id)
@Path(value="/recent") @GET public javax.ws.rs.core.Response listRecent()
@Path(value="")
@GET
public javax.ws.rs.core.Response searchStorieByText(@DefaultValue(value="") @QueryParam(value="contains")
String contains,
@DefaultValue(value="0") @QueryParam(value="page")
int page,
@DefaultValue(value="10") @QueryParam(value="maxItems")
int maxItems)
@Path(value="/hottest")
@GET
public javax.ws.rs.core.Response listMostReadedStories(@QueryParam(value="initialDate")
String initialDateStr,
@QueryParam(value="finalDate")
String finalDateStr)
@Path(value="/filter")
@GET
public javax.ws.rs.core.Response listStories(@QueryParam(value="maxItems") @DefaultValue(value="10")
int maxItems,
@QueryParam(value="page") @DefaultValue(value="0")
int page,
@QueryParam(value="genre")
es.uvigo.esei.dgss.teama.microstories.domain.entities.Topic genre,
@QueryParam(value="theme")
es.uvigo.esei.dgss.teama.microstories.domain.entities.Type theme,
@QueryParam(value="publication")
long publication)
@Path(value="{id}")
@DELETE
public javax.ws.rs.core.Response delete(@PathParam(value="id")
int id)
@Path(value="") @POST @Consumes(value="application/json") public javax.ws.rs.core.Response createStory(es.uvigo.esei.dgss.teama.microstories.domain.entities.Story story)
Copyright © 2021. All rights reserved.