public class FilterFavoriteService extends Object
OnmsFilterFavorite
objects.Modifier and Type | Class and Description |
---|---|
static class |
FilterFavoriteService.FilterFavoriteException |
Constructor and Description |
---|
FilterFavoriteService() |
Modifier and Type | Method and Description |
---|---|
OnmsFilterFavorite |
createFavorite(String userName,
String favoriteName,
String filterString,
OnmsFilterFavorite.Page page) |
boolean |
deleteFavorite(int favoriteId,
String userName)
Deletes the favorite.
|
protected boolean |
deleteFavorite(OnmsFilterFavorite favorite) |
boolean |
deleteFavorite(String favoriteId,
String username)
Deletes the given favorite, but only if the given username is allowed to delete.
|
OnmsFilterFavorite |
getFavorite(Integer favoriteId,
String userName)
Returns the requested favorite if the favorite exists and if the given username is allowed to load the favorite.
|
OnmsFilterFavorite |
getFavorite(String favoriteId,
String userName)
Returns the requested favorite if the favorite exists, the favoriteId is a valid Integer and if the given username is allowed to load the favorite.
|
OnmsFilterFavorite |
getFavorite(String favoriteId,
String username,
String filterString)
Returns a favorite only if the given user is allowed to see that favorite and if the given filterString matches with the stored filter criteria inside the favorite.
|
List<OnmsFilterFavorite> |
getFavorites(String userName,
OnmsFilterFavorite.Page page)
Loads all favorites for the user and the given page.
|
protected FilterFavoriteDao |
getFilterFavoriteDao() |
protected void |
setFilterFavoriteDao(FilterFavoriteDao favoriteDao) |
public OnmsFilterFavorite getFavorite(String favoriteId, String username, String filterString)
favoriteId
- The id of the favorite.username
- The username which tries to load the favorite.filterString
- The expected filter criteria.public boolean deleteFavorite(String favoriteId, String username)
favoriteId
- username
- public OnmsFilterFavorite getFavorite(String favoriteId, String userName)
favoriteId
- The id of the favorite.userName
- The user which tries to load the favorite.public OnmsFilterFavorite getFavorite(Integer favoriteId, String userName)
favoriteId
- The id of the favorite.userName
- The user which tries to load the favorite.public boolean deleteFavorite(int favoriteId, String userName)
favoriteId
- userName
- public List<OnmsFilterFavorite> getFavorites(String userName, OnmsFilterFavorite.Page page)
userName
- page
- public OnmsFilterFavorite createFavorite(String userName, String favoriteName, String filterString, OnmsFilterFavorite.Page page) throws FilterFavoriteService.FilterFavoriteException
protected void setFilterFavoriteDao(FilterFavoriteDao favoriteDao)
protected FilterFavoriteDao getFilterFavoriteDao()
protected boolean deleteFavorite(OnmsFilterFavorite favorite)
Copyright © 2020. All rights reserved.