Package org.graylog.events.processor
Class DBEventDefinitionService
java.lang.Object
org.graylog2.database.PaginatedDbService<E>
org.graylog2.database.entities.ScopedDbService<EventDefinitionDto>
org.graylog.events.processor.DBEventDefinitionService
-
Field Summary
Fields inherited from class org.graylog2.database.entities.ScopedDbService
entityScopeService
Fields inherited from class org.graylog2.database.PaginatedDbService
db
-
Constructor Summary
ConstructorDescriptionDBEventDefinitionService
(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper, DBEventProcessorStateService stateService, EntityOwnershipService entityOwnerShipService, EntityScopeService entityScopeService) -
Method Summary
Modifier and TypeMethodDescriptionint
int
@NotNull List<EventDefinitionDto>
getByArrayValue
(String arrayField, String field, String value) Returns the list of event definitions that contain the given value in the specified array fieldgetByNotificationId
(String notificationId) Returns the list of event definitions that is using the given notification ID.Returns the list of system event definitionssave
(EventDefinitionDto entity) Stores the givenPaginatedDbService
in the database.saveWithOwnership
(EventDefinitionDto eventDefinitionDto, User user) searchPaginated
(SearchQuery query, Predicate<EventDefinitionDto> filter, String sortByField, String sortOrder, int page, int perPage) Methods inherited from class org.graylog2.database.entities.ScopedDbService
delete, ensureDeletability, ensureMutability, ensureValidScope, forceDelete, isDeletable, isMutable
Methods inherited from class org.graylog2.database.PaginatedDbService
asImmutableList, findPaginatedWithQueryAndSort, findPaginatedWithQueryFilterAndSort, findPaginatedWithQueryFilterAndSortWithGrandTotal, get, getMultiFieldSortBuilder, getPage, getSortBuilder, streamAll, streamByIds, streamQuery, streamQueryWithSort
-
Constructor Details
-
DBEventDefinitionService
@Inject public DBEventDefinitionService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper, DBEventProcessorStateService stateService, EntityOwnershipService entityOwnerShipService, EntityScopeService entityScopeService)
-
-
Method Details
-
searchPaginated
public PaginatedList<EventDefinitionDto> searchPaginated(SearchQuery query, Predicate<EventDefinitionDto> filter, String sortByField, String sortOrder, int page, int perPage) -
saveWithOwnership
-
save
Description copied from class:PaginatedDbService
Stores the givenPaginatedDbService
in the database.- Overrides:
save
in classScopedDbService<EventDefinitionDto>
- Parameters:
entity
- thePaginatedDbService
to save- Returns:
- the newly saved
PaginatedDbService
-
deleteUnregister
-
deleteUnregisterImmutable
-
getByNotificationId
Returns the list of event definitions that is using the given notification ID.- Parameters:
notificationId
- the notification ID- Returns:
- the event definitions with the given notification ID
-
getSystemEventDefinitions
Returns the list of system event definitions- Returns:
- the matching event definitions
-
getByArrayValue
@NotNull public @NotNull List<EventDefinitionDto> getByArrayValue(String arrayField, String field, String value) Returns the list of event definitions that contain the given value in the specified array field
-