This commit is contained in:
gexce
2017-10-27 15:34:02 +02:00
parent 978cba8229
commit 4c9f8bf453
6 changed files with 23 additions and 589 deletions
@@ -52,8 +52,7 @@ public class MamMigrationSelective implements CommandLineRunner {
static final String adamHost = "https://edam-q.bayer.com:2015";
static final String mamHost = "https://service.media-assistant.animalhealth.bayer.com";
private List<Integer> entrySelection = new ArrayList<Integer>(Arrays.asList( 28861, 28860, 71948, 71048, 70778, /*70746, 70142,*/ 70361/*, 63924, 71263, 63201, 56942, 57641, 70745, 70440, 70340,
70288, 71725*/));
private List<Integer> entrySelection = new ArrayList<Integer>(Arrays.asList( 72048, 60984 ));
static final String categoryJson = "resources/2017-10-19_categories.json";
static final String categoryMapping = "resources/Media_Assistant_Categories_131017_EDITED_without_archive.csv";
@@ -85,6 +84,7 @@ public class MamMigrationSelective implements CommandLineRunner {
@Override
public void run(String... strings) throws Exception {
// XXX
readEntryIDsFromFile();
log.info("Write log headers for " + entryLog.getAbsolutePath());
@@ -119,17 +119,12 @@ public class MamMigrationSelective implements CommandLineRunner {
HttpEntity<String> entity = new HttpEntity<String>("", mamHeaders);
for (int id : entrySelection) {
// XXX
// if (id > 80000 || id < 72009) //72048
// if needed start from a certain ID
// if (id > 60984 || id < 60984)
// continue;
log.info("GET entry " + id);
Entry entry = restTemplate.exchange(mamHost + "/rest/migration/entry/{id}", HttpMethod.GET, entity, Entry.class, id).getBody();