blob: 6612d1564e2ab75bda8f74f2d0ddf00ada56dcfe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package com.vaadin.tests.applicationservlet;
import com.vaadin.launcher.ApplicationRunnerServlet;
import com.vaadin.launcher.CustomDeploymentConfiguration;
import com.vaadin.launcher.CustomDeploymentConfiguration.Conf;
import com.vaadin.server.DeploymentConfiguration;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.Label;
@CustomDeploymentConfiguration({
@Conf(name = "customParam", value = "customValue"),
@Conf(name = "resourceCacheTime", value = "3599") })
public class CustomDeploymentConf extends AbstractReindeerTestUI {
@Override
protected void setup(VaadinRequest request) {
DeploymentConfiguration deploymentConfiguration = getSession()
.getService().getDeploymentConfiguration();
addComponent(new Label("Resource cache time: "
+ deploymentConfiguration.getResourceCacheTime()));
addComponent(new Label("Custom config param: " + deploymentConfiguration
.getApplicationOrSystemProperty("customParam", null)));
}
@Override
protected String getTestDescription() {
return "Demonstrates the @"
+ CustomDeploymentConfiguration.class.getSimpleName()
+ " feature that allows customizing the effective deployment configuration for test UIs run through "
+ ApplicationRunnerServlet.class.getSimpleName() + ".";
}
@Override
protected Integer getTicketNumber() {
return Integer.valueOf(14215);
}
}
|