Package org.graylog.security.authservice
Class DBAuthServiceBackendService
java.lang.Object
org.graylog2.database.PaginatedDbService<AuthServiceBackendDTO>
org.graylog.security.authservice.DBAuthServiceBackendService
-
Field Summary
Fields inherited from class org.graylog2.database.PaginatedDbService
db -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDBAuthServiceBackendService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper, Map<String, AuthServiceBackend.Factory<? extends AuthServiceBackend>> backendFactories, com.google.common.eventbus.EventBus eventBus) -
Method Summary
Modifier and TypeMethodDescriptionlongintDeletes thePaginatedDbServicefor the given ID from the database.findPaginated(PaginationParameters params, Predicate<AuthServiceBackendDTO> filter) save(AuthServiceBackendDTO newBackend) Stores the givenPaginatedDbServicein the database.Methods inherited from class org.graylog2.database.PaginatedDbService
asImmutableList, findPaginatedWithQueryAndSort, findPaginatedWithQueryFilterAndSort, findPaginatedWithQueryFilterAndSortWithGrandTotal, get, getMultiFieldSortBuilder, getPage, getSortBuilder, streamAll, streamByIds, streamQuery, streamQueryWithSort
-
Constructor Details
-
DBAuthServiceBackendService
@Inject protected DBAuthServiceBackendService(MongoConnection mongoConnection, MongoJackObjectMapperProvider mapper, Map<String, AuthServiceBackend.Factory<? extends AuthServiceBackend>> backendFactories, com.google.common.eventbus.EventBus eventBus)
-
-
Method Details
-
save
Description copied from class:PaginatedDbServiceStores the givenPaginatedDbServicein the database.- Overrides:
savein classPaginatedDbService<AuthServiceBackendDTO>- Parameters:
newBackend- thePaginatedDbServiceto save- Returns:
- the newly saved
PaginatedDbService
-
delete
Description copied from class:PaginatedDbServiceDeletes thePaginatedDbServicefor the given ID from the database.- Overrides:
deletein classPaginatedDbService<AuthServiceBackendDTO>- Parameters:
id- ID of thePaginatedDbServiceto delete- Returns:
- the number of deleted documents
-
countBackends
public long countBackends() -
findPaginated
public PaginatedList<AuthServiceBackendDTO> findPaginated(PaginationParameters params, Predicate<AuthServiceBackendDTO> filter)
-