Revision a1f20d24
Added by Andreas Müller almost 9 years ago
app-import/src/main/java/eu/etaxonomy/cdm/database/update/BgbmInstancesUpdater.java | ||
---|---|---|
1 | 1 |
/** |
2 |
*
|
|
2 |
* |
|
3 | 3 |
*/ |
4 | 4 |
package eu.etaxonomy.cdm.database.update; |
5 | 5 |
|
... | ... | |
20 | 20 |
*/ |
21 | 21 |
public class BgbmInstancesUpdater { |
22 | 22 |
private static final Logger logger = Logger.getLogger(BgbmInstancesUpdater.class); |
23 |
|
|
23 |
|
|
24 | 24 |
private static String integrationServer = "160.45.63.201"; |
25 | 25 |
private static String productionServer = "160.45.63.171"; |
26 | 26 |
// private static String testServer = "160.45.63.175"; |
27 | 27 |
private static String testServer = "edit-test.bgbm.fu-berlin.de"; //preliminary |
28 |
|
|
28 |
|
|
29 | 29 |
private static String[] integrationDatabases = new String[]{/**/"cdm_integration_cichorieae", |
30 | 30 |
"cdm_integration_cyprus", "cdm_integration_diptera", "cdm_integration_flora_malesiana", |
31 | 31 |
"cdm_integration_palmae"}; |
32 |
|
|
33 |
private static String[] testDatabases = new String[]{"cdm_bgbm_edit_usergroup","cdm_campanulaceae", |
|
32 |
|
|
33 |
private static String[] testDatabases = new String[]{ |
|
34 |
"cdm_bgbm_edit_usergroup", |
|
35 |
"cdm_campanulaceae", |
|
34 | 36 |
"cdm_campanulaceae_082014","cdm_caryo", "cdm_col","cdm_corvidae","cdm_cyprus","cdm_demo1","cdm_demo2", |
35 | 37 |
"cdm_demo3", "cdm_edit_algaterra","cdm_edit_cichorieae","cdm_edit_ildis","cdm_edit_flora_central_africa", |
36 |
"cdm_flora_guianas","cdm_flore_gabon","cdm_edit_flora_malesiana","cdm_edit_globis","cdm_edit_palmae",
|
|
38 |
"cdm_flora_guianas","cdm_flore_gabon","cdm_edit_flora_malesiana","cdm_edit_globis","cdm_edit_palmae", |
|
37 | 39 |
"cdm_ipni_Caryophyllaceae","cdm_mt_moose","cdm_mt_standardliste", |
38 | 40 |
"cdm_pesi_euromed", "cdm_pesi_erms","cdm_pesi_fauna_europaea", |
39 |
"cdm_proibiosphere_chenopodium_pilot","cdm_rl_mammalia","cdm_rl_animals","cdm_test_eckhard","cdm_test_euromed","cdm_test_gabi", |
|
40 |
"cdm_test_norbert","cdm_test_sabine","cdm_vibrant_index"}; |
|
41 |
|
|
41 |
"cdm_proibiosphere_chenopodium_pilot","cdm_rl_mammalia", |
|
42 |
"cdm_test_eckhard","cdm_test_euromed","cdm_test_gabi", |
|
43 |
"cdm_test_norbert","cdm_test_sabine","cdm_vibrant_index" |
|
44 |
}; |
|
45 |
|
|
42 | 46 |
private static String[] testDatabasesOthers = new String[]{"cdm_caryo_amaranthaceae", |
43 | 47 |
"cdm_caryo_caryophyllales","cdm_flora_malesiana_prospective","cdm_pesi_all","cdm_salvador", |
44 | 48 |
}; |
45 |
|
|
49 |
|
|
46 | 50 |
private static String[] productionDatabases = new String[]{ |
47 |
"cdm_col", "cdm_production_acantholimon","cdm_production_algaterra",
|
|
51 |
"cdm_production_acantholimon","cdm_production_algaterra", |
|
48 | 52 |
"cdm_production_amaranthaceae","cdm_production_cactaceae", |
49 | 53 |
"cdm_production_campanulaceae","cdm_production_caryophyllales", |
50 | 54 |
"cdm_production_chenopodiaceae","cdm_production_cichorieae", |
55 |
"cdm_production_col", |
|
51 | 56 |
"cdm_production_corvidae","cdm_production_cyprus", |
52 | 57 |
"cdm_production_dianthus","cdm_production_diptera", |
58 |
"cdm_production_euromed", |
|
53 | 59 |
"cdm_production_flora_central_africa","cdm_production_flora_guianas", |
54 | 60 |
"cdm_production_flora_malesiana","cdm_production_flora_malesiana_prospective", |
55 | 61 |
"cdm_production_flore_gabon", |
... | ... | |
57 | 63 |
"cdm_production_palmae","cdm_production_piB_campylopus_pilot", |
58 | 64 |
"cdm_production_piB_eupolybothrus_pilot","cdm_production_piB_lactarius_pilot", |
59 | 65 |
"cdm_production_piB_loranthaceae","cdm_production_piB_nephrolepis_pilot", |
60 |
"cdm_production_piB_spiders_pilot","cdm_production_polygonaceae", |
|
61 | 66 |
"cdm_production_piB_ants_pilot","cdm_production_piB_chenopodium_pilot", |
62 |
"cdm_production_rl_armeria_demo","cdm_production_rl_lumbricidae", |
|
63 |
"cdm_production_rl_standardliste","cdm_production_rl_animals","cdm_production_rl_moose", |
|
64 |
"cdm_production_tamaricaceae","cdm_production_vibrant_index"}; |
|
67 |
"cdm_production_piB_spiders_pilot", |
|
68 |
"cdm_production_polygonaceae", |
|
69 |
"cdm_production_rl_animalis", //not yet filled |
|
70 |
"cdm_production_rl_armeria_demo", "cdm_production_rl_lumbricidae", |
|
71 |
"cdm_production_rl_standardliste", "cdm_production_rl_moose", |
|
72 |
"cdm_production_tamaricaceae","cdm_production_vibrant_index" |
|
73 |
}; |
|
65 | 74 |
|
66 | 75 |
|
67 | 76 |
static BgbmServer bgbmServer = BgbmServer.PRODUCTION; |
68 |
|
|
69 |
|
|
70 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
71 | 80 |
static String username = "edit"; |
72 |
|
|
73 |
|
|
74 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
75 | 84 |
/** |
76 | 85 |
* @param args |
77 | 86 |
*/ |
... | ... | |
90 | 99 |
} catch (Exception e) { |
91 | 100 |
result = false; |
92 | 101 |
e.printStackTrace(); |
93 |
}
|
|
102 |
} |
|
94 | 103 |
if(!result ){ |
95 | 104 |
logger.warn("Problem"); |
96 | 105 |
break; |
97 | 106 |
} |
98 |
|
|
107 |
|
|
99 | 108 |
logger.warn("Update: " + database + " ... DONE "); |
100 | 109 |
} |
101 |
|
|
102 |
|
|
110 |
|
|
111 |
|
|
103 | 112 |
} |
104 |
|
|
113 |
|
|
105 | 114 |
private enum BgbmServer{ |
106 | 115 |
INTEGRATION (integrationServer, integrationDatabases), |
107 | 116 |
TEST(testServer,testDatabases), |
108 | 117 |
PRODUCTION(productionServer,productionDatabases); |
109 |
private String server; |
|
110 |
private String[] databases; |
|
118 |
private final String server;
|
|
119 |
private final String[] databases;
|
|
111 | 120 |
private BgbmServer(String server, String[] databases){ |
112 | 121 |
this.server = server; |
113 | 122 |
this.databases = databases; |
114 | 123 |
} |
115 |
|
|
116 |
|
|
117 |
|
|
124 |
|
|
125 |
|
|
126 |
|
|
118 | 127 |
} |
119 | 128 |
} |
Also available in: Unified diff
update BgbmInstancesUpdater