@PermitAll public class StoryService extends Object
| Constructor and Description |
|---|
StoryService() |
| Modifier and Type | Method and Description |
|---|---|
es.uvigo.esei.dgss.teamc.microstories.entities.Story |
get(Long id)
Returns the Story with the given id
|
Long |
getNumberStoriesByText(String text)
Returns the number of stories matching the search text
|
List<es.uvigo.esei.dgss.teamc.microstories.entities.Story> |
getStoriesByText(String text,
int noOfStories,
int pageIndex)
Returns a list of stories filtered by a string
|
List<es.uvigo.esei.dgss.teamc.microstories.entities.Story> |
listRecent()
Returns the 6 most recent Stories
|
public List<es.uvigo.esei.dgss.teamc.microstories.entities.Story> listRecent()
public es.uvigo.esei.dgss.teamc.microstories.entities.Story get(Long id) throws IllegalArgumentException
id - the id of the Story to returnIllegalArgumentException - if given id is nullpublic List<es.uvigo.esei.dgss.teamc.microstories.entities.Story> getStoriesByText(String text, int noOfStories, int pageIndex) throws IllegalArgumentException
text - search string to filter the listnoOfStories - number of stories to be shown per pagepageIndex - index of page to be shownIllegalArgumentException - if given text is null or the page index is
negative or out of rangeCopyright © 2021. All rights reserved.