Class PopulateTestData
java.lang.Object
org.tailormap.api.configuration.dev.PopulateTestData
@Configuration
@ConditionalOnProperty(name="tailormap-api.database.populate-testdata",
havingValue="true")
public class PopulateTestData
extends Object
Populates entities to add services and applications to demo functionality, support development
and use in integration tests with a common set of test data. See README.md for usage details.
-
Constructor Summary
ConstructorDescriptionPopulateTestData
(org.springframework.context.ApplicationContext appContext, UserRepository userRepository, GroupRepository groupRepository, CatalogRepository catalogRepository, GeoServiceRepository geoServiceRepository, GeoServiceHelper geoServiceHelper, SolrService solrService, TaskManagerService taskManagerService, FeatureSourceRepository featureSourceRepository, ApplicationRepository applicationRepository, ConfigurationRepository configurationRepository, FeatureSourceFactoryHelper featureSourceFactoryHelper, SearchIndexRepository searchIndexRepository, UploadRepository uploadRepository, PageRepository pageRepository) -
Method Summary
-
Constructor Details
-
PopulateTestData
public PopulateTestData(org.springframework.context.ApplicationContext appContext, UserRepository userRepository, GroupRepository groupRepository, CatalogRepository catalogRepository, GeoServiceRepository geoServiceRepository, GeoServiceHelper geoServiceHelper, SolrService solrService, TaskManagerService taskManagerService, FeatureSourceRepository featureSourceRepository, ApplicationRepository applicationRepository, ConfigurationRepository configurationRepository, FeatureSourceFactoryHelper featureSourceFactoryHelper, SearchIndexRepository searchIndexRepository, UploadRepository uploadRepository, PageRepository pageRepository)
-
-
Method Details
-
populate
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) @Transactional public void populate() throws Exception- Throws:
Exception
-
createTestUsersAndGroups
- Throws:
NoSuchElementException
-
createAppTestData
- Throws:
Exception
-
createSolrIndex
- Throws:
Exception
-