1
|
/**
|
2
|
* Copyright (C) 2009 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.dataportal;
|
10
|
|
11
|
import java.net.URI;
|
12
|
import java.util.UUID;
|
13
|
|
14
|
/**
|
15
|
*
|
16
|
* @author a.kohlbecker
|
17
|
*
|
18
|
*/
|
19
|
public class DataPortalContext {
|
20
|
|
21
|
URI baseUri;
|
22
|
URI cdmServerUri;
|
23
|
UUID classificationUUID;
|
24
|
String siteName; //TODO could be read with drush: $ drush vget site_name
|
25
|
String themeName;
|
26
|
private String siteLabel;
|
27
|
|
28
|
public DataPortalContext(URI baseUri, URI cdmServerUri, UUID classificationUUID, String siteName, String siteLabel) {
|
29
|
this.baseUri = baseUri;
|
30
|
this.cdmServerUri = cdmServerUri;
|
31
|
this.classificationUUID = classificationUUID;
|
32
|
this.siteName = siteName;
|
33
|
this.siteLabel = siteLabel;
|
34
|
}
|
35
|
|
36
|
public URI getBaseUri() {
|
37
|
return baseUri;
|
38
|
}
|
39
|
|
40
|
/**
|
41
|
* <code>UNUSED</code>
|
42
|
* @return
|
43
|
*/
|
44
|
public URI getCdmServerUri() {
|
45
|
return cdmServerUri;
|
46
|
}
|
47
|
|
48
|
/**
|
49
|
* <code>UNUSED</code>
|
50
|
* @return
|
51
|
*/
|
52
|
public UUID getClassificationUUID() {
|
53
|
return classificationUUID;
|
54
|
}
|
55
|
|
56
|
public String getSiteName() {
|
57
|
return siteName;
|
58
|
}
|
59
|
|
60
|
public String getSiteLabel() {
|
61
|
return siteLabel;
|
62
|
}
|
63
|
|
64
|
|
65
|
|
66
|
/**
|
67
|
*
|
68
|
* @param pageHeader
|
69
|
*
|
70
|
* @return The drupal site title as it is produced by drupal
|
71
|
*/
|
72
|
public String prepareTitle(String pageHeader) {
|
73
|
return pageHeader + " | " + getSiteName();
|
74
|
}
|
75
|
|
76
|
}
|