1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.dataportal;
|
11
|
|
12
|
import java.net.URI;
|
13
|
import java.net.URISyntaxException;
|
14
|
import java.util.UUID;
|
15
|
|
16
|
/**
|
17
|
* TODO 1. allow overwriting the hard coded contexts configuration by {user.home}/.cdmLibrary/DataPortalTest.properties
|
18
|
* TODO 2. let constructor read from a dataPortalTestContext.properties located in the jar (/dataportal-selenium-tests/src/main/resources/eu/etaxonomy/dataportal/DataPortalTest.properties)
|
19
|
* TODO 3. DataPortalTest.properties should allow setting the defalut eu.etaxonomy.dataportal.selenium.CdmDataPortalTestBase.SYSTEM_PROPERTY_NAME_BROWSER
|
20
|
* TODO 4. DataPortalTest.properties should allow setting webdriver.firefox.bin etc in order to circumven the need to set it by -Dwebdriver.firefox.bin
|
21
|
*
|
22
|
* @author a.kohlbecker
|
23
|
*
|
24
|
*/
|
25
|
public enum DataPortalContext {
|
26
|
|
27
|
cichorieae("http://160.45.63.201/dataportal/preview/cichorieae/", "http://127.0.0.1:8080", "534e190f-3339-49ba-95d9-fa27d5493e3e"),
|
28
|
palmae("http://160.45.63.201/dataportal/preview/cyprus/", "http://127.0.0.1:8080", "534e190f-3339-49ba-95d9-fa27d5493e3e"),
|
29
|
cyprus("http://160.45.63.201/dataportal/preview/cyprus/", "http://127.0.0.1:8080", "0c2b5d25-7b15-4401-8b51-dd4be0ee5cab");
|
30
|
|
31
|
URI baseUri;
|
32
|
URI cdmServerUri;
|
33
|
UUID classificationUUID;
|
34
|
String themeName;
|
35
|
|
36
|
private DataPortalContext(String baseUri, String cdmServerUri, String classificationUUID) {
|
37
|
try {
|
38
|
this.baseUri = new URI(baseUri);
|
39
|
this.cdmServerUri = new URI(cdmServerUri);
|
40
|
} catch (URISyntaxException e) {
|
41
|
throw new RuntimeException(e);
|
42
|
}
|
43
|
this.classificationUUID = UUID.fromString(classificationUUID);
|
44
|
}
|
45
|
|
46
|
public URI getBaseUri() {
|
47
|
return baseUri;
|
48
|
}
|
49
|
|
50
|
public URI getCdmServerUri() {
|
51
|
return cdmServerUri;
|
52
|
}
|
53
|
|
54
|
public UUID getClassificationUUID() {
|
55
|
return classificationUUID;
|
56
|
}
|
57
|
|
58
|
}
|