1 package com.atlassian.pageobjects;
2
3 import static com.google.common.base.Preconditions.checkNotNull;
4
5
6
7
8
9
10 public class DefaultProductInstance implements ProductInstance
11 {
12 private final String baseUrl;
13 private final String instanceId;
14 private final int httpPort;
15 private final String contextPath;
16
17
18 public DefaultProductInstance(final String baseUrl, final String instanceId, final int httpPort, final String contextPath)
19 {
20 this.baseUrl = checkNotNull(baseUrl, "baseUrl");
21 this.instanceId = instanceId;
22 this.httpPort = httpPort;
23 this.contextPath = contextPath;
24 }
25
26 public String getBaseUrl()
27 {
28 return baseUrl.toLowerCase();
29 }
30
31 public int getHttpPort()
32 {
33 return httpPort;
34 }
35
36 public String getContextPath()
37 {
38 return contextPath;
39 }
40
41 public String getInstanceId() {
42 return instanceId;
43 }
44 }