use of com.hack23.cia.model.external.riksdagen.voteringlista.impl.BallotDocumentElement in project cia by Hack23.
the class RiksdagenBallotListWorkGeneratorImpl method generateWorkOrders.
@Override
public void generateWorkOrders() {
try {
final List<BallotDocumentElement> ballotList = riksdagenApi.getBallotList();
final Map<String, String> alreadySavedIdMap = getImportService().getLoadedBallotIdMap();
for (final BallotDocumentElement ballotDocument : ballotList) {
if (!alreadySavedIdMap.containsKey(ballotDocument.getBallotId())) {
getJmsSender().send(voteDataWorkdestination, ballotDocument.getBallotId());
LOGGER.info("Load : https://data.riksdagen.se/votering/{}", ballotDocument.getBallotId());
}
}
} catch (final DataFailureException e) {
LOGGER.warn("Loadin ballots", e);
}
}
Aggregations