use of org.ambraproject.rhino.model.ingest.ArticleItemInput in project rhino by PLOS.
the class HibernatePersistenceServiceImpl method persistAssets.
@Override
public void persistAssets(ArticlePackage articlePackage, ArticleIngestion ingestion) {
List<ArticleItem> items = articlePackage.getAllItems().stream().map((ArticleItemInput item) -> contentRepoPersistenceService.createItem(item, ingestion)).collect(Collectors.toList());
for (ArticleItem item : items) {
hibernateTemplate.save(item);
}
Collection<ArticleFile> files = contentRepoPersistenceService.persistAncillaryFiles(articlePackage, ingestion);
for (ArticleFile file : files) {
hibernateTemplate.save(file);
}
persistStrikingImage(ingestion, items, articlePackage.getManifest());
}
Aggregations