public class StoryService extends Object
| Constructor and Description |
|---|
StoryService() |
| Modifier and Type | Method and Description |
|---|---|
es.uvigo.esei.dgss.teama.microstories.domain.entities.Story |
findById(int id)
Returns the story identified by
id. |
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
findByText(String text)
Returns a list of stories that contains in its title or text a string passed by param.
|
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
findByText(String text,
int page,
int size)
Returns a list of paginated stories that contains in its title or text a string passed by param.
|
List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> |
findRecent()
Returns the list of recent stories published.
|
@PermitAll @Produces(value="application/json") public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> findRecent()
@PermitAll public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> findByText(String text, int page, int size)
text - the string that we want to use to filter stories.page - the page number. If it is less than 0 it returns the first page.size - the number of stories contained in a page. If it is less than 0 or greater than 100, it
returns at most 100 stories.@PermitAll public List<es.uvigo.esei.dgss.teama.microstories.domain.entities.Story> findByText(String text)
text - the string that we want to use to filter stories.@PermitAll @Produces(value="application/json") public es.uvigo.esei.dgss.teama.microstories.domain.entities.Story findById(int id)
id. If there is no story with
the specified id, null will be returned.id - the id of a story.null if there is no
story with the specified id.Copyright © 2018. All rights reserved.