1 package com.atlassian.plugin.refimpl;
2
3 import com.atlassian.plugin.webresource.UrlMode;
4
5 import java.net.URI;
6
7 public class ParameterUtils {
8 public static String getBaseUrl(UrlMode urlMode) {
9 String port = System.getProperty("http.port", "5990");
10 String baseUrl = System.getProperty("baseurl", "http://localhost:" + port + "/atlassian-refapp");
11 if (urlMode == UrlMode.ABSOLUTE) {
12 return baseUrl;
13 }
14 return URI.create(baseUrl).getPath();
15 }
16 }