Tim Pettersen committed bf8382a

Support specifying HipChat API baseUrl via hipchat.api.url system property.

Comments (0)

Files changed (2)

 ![HipChat status in Confluence](
 ![Blog notifications inside a HipChat room](
+# HipChat Server Beta
+Participating in the [HipChat Server Beta]( Start Confluence with the following system property to target your local HipChat server:
+    -Dhipchat.api.url=


     private static final int CONNECTION_TIMEOUT_MILLIS = 5000;
     private static final Logger log = LoggerFactory.getLogger("atlassian.plugin");
-    private static final String API_BASE_URI = "";
+    private static final String API_BASE_URI = determineApiBaseUri();
     private final ConfigurationManager configurationManager;
     private final RequestFactory<Request<?, Response>> requestFactory;
         this.executorService = executorFactory.createExecutorService(Executors.newFixedThreadPool(1));
+    private static String determineApiBaseUri()
+    {
+        String apiBase = System.getProperty("hipchat.api.url", "");
+        // strip trailing slashes
+        while (apiBase.endsWith("/"))
+        {
+            apiBase = apiBase.substring(0, apiBase.length() - 1);
+        }
+ + " will be used for HipChat integration (if enabled).");
+        return apiBase;
+    }
      * Returns the JSON representation of a user in HipChat.
      * <pre>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.