Search in sources :

Example 1 with RandomObjectIdProvider

use of org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.view.RandomObjectIdProvider in project graylog2-server by Graylog2.

the class V20191203120602_MigrateSavedSearchesToViewsTest method setUp.

@Before
public void setUp() throws Exception {
    final MongoJackObjectMapperProvider mapperProvider = new MongoJackObjectMapperProvider(new ObjectMapper());
    final SavedSearchService savedSearchService = new SavedSearchService(mongodb.mongoConnection(), mapperProvider);
    final RandomObjectIdProvider randomObjectIdProvider = new StaticRandomObjectIdProvider(new Date(1575020937839L));
    final RandomUUIDProvider randomUUIDProvider = new RandomUUIDProvider(new Date(1575020937839L), 1575020937839L);
    this.migration = new V20191203120602_MigrateSavedSearchesToViews(clusterConfigService, savedSearchService, searchService, viewService, randomObjectIdProvider, randomUUIDProvider);
}
Also used : RandomObjectIdProvider(org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.view.RandomObjectIdProvider) SavedSearchService(org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.savedsearch.SavedSearchService) MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) RandomUUIDProvider(org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.view.RandomUUIDProvider) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Date(java.util.Date) Before(org.junit.Before)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Date (java.util.Date)1 SavedSearchService (org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.savedsearch.SavedSearchService)1 RandomObjectIdProvider (org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.view.RandomObjectIdProvider)1 RandomUUIDProvider (org.graylog.plugins.views.migrations.V20191203120602_MigrateSavedSearchesToViewsSupport.view.RandomUUIDProvider)1 MongoJackObjectMapperProvider (org.graylog2.bindings.providers.MongoJackObjectMapperProvider)1 Before (org.junit.Before)1