Class FavoritesService
java.lang.Object
org.graylog2.database.PaginatedDbService<FavoritesForUserDTO>
org.graylog.plugins.views.favorites.FavoritesService
-
Field Summary
Fields inherited from class org.graylog2.database.PaginatedDbService
db
-
Constructor Summary
ModifierConstructorDescriptionprotected
FavoritesService
(MongoConnection mongoConnection, com.google.common.eventbus.EventBus eventBus, MongoJackObjectMapperProvider mapper, Catalog catalog, GRNRegistry grnRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFavoriteItemFor
(String in, SearchUser searchUser) create
(FavoritesForUserDTO favorite, SearchUser searchUser) findFavoritesFor
(SearchUser searchUser, Optional<String> type, int page, int perPage) void
void
removeFavoriteItemFor
(String in, SearchUser searchUser) void
Methods inherited from class org.graylog2.database.PaginatedDbService
asImmutableList, delete, findPaginatedWithQueryAndSort, findPaginatedWithQueryFilterAndSort, findPaginatedWithQueryFilterAndSortWithGrandTotal, get, getMultiFieldSortBuilder, getPage, getSortBuilder, save, streamAll, streamByIds, streamQuery, streamQueryWithSort
-
Field Details
-
COLLECTION_NAME
- See Also:
-
-
Constructor Details
-
FavoritesService
@Inject protected FavoritesService(MongoConnection mongoConnection, com.google.common.eventbus.EventBus eventBus, MongoJackObjectMapperProvider mapper, Catalog catalog, GRNRegistry grnRegistry)
-
-
Method Details
-
findFavoritesFor
public PaginatedResponse<Favorite> findFavoritesFor(SearchUser searchUser, Optional<String> type, int page, int perPage) -
addFavoriteItemFor
-
removeFavoriteItemFor
-
create
-
removeFavoriteOnEntityDeletion
-
removeFavoriteEntityOnUserDeletion
-