@Override protected String getBaseUrl() { String siteURL = super.getBaseUrl(); if (siteURL == null) { // there is no baseUrl set. Lets read confluence one from Applinks Configuration // TODO look at JST-460 and remove following code that reads the base url from Crucible ApplicationInstance primaryCrucible = getApplicationsInstancesInternal(Application.CRUCIBLE).getPrimary(); if (primaryCrucible!=null) { siteURL = primaryCrucible.getUrl(); AppConfig.getsConfig().getConfig().getWebServer().setSiteUrl(siteURL); log.warn("FishEye base url empty. Setting to " +siteURL); siteURL = removeTrailingSlash(siteURL); } } return siteURL; }
if (this.cfg.getWebServer() != null) if (this.cfg.getWebServer().isSetSiteUrl()) appProps.setValue(SITE_URL, this.cfg.getWebServer().getSiteUrl()); if (this.cfg.getWebServer().isSetContext()) appProps.setValue(SITE_CONTEXT, this.cfg.getWebServer().getContext()); if (this.cfg.getWebServer().isSetHttp()) if (this.cfg.getWebServer().getHttp().isSetContext()) appProps.setValue(HTTP_CONTEXT, this.cfg.getWebServer().getHttp().getContext()); appProps.setValue(HTTP_BIND, this.cfg.getWebServer().getHttp().getBind()); if (this.cfg.getWebServer().getHttp().isSetProxyHost()) appProps.setValue(SITE_PROXY_HOST, String.valueOf(this.cfg.getWebServer().getHttp().getProxyHost())); if (this.cfg.getWebServer().getHttp().isSetProxyPort()) appProps.setValue(SITE_PROXY_PORT, String.valueOf(this.cfg.getWebServer().getHttp().getProxyPort())); if (this.cfg.getWebServer().getHttp().isSetProxyScheme()) appProps.setValue(SITE_PROXY_SCHEME, this.cfg.getWebServer().getHttp().getProxyScheme());
/** * Set the base URL of this application */ @Override protected void setBaseUrl(final String url) throws Exception { // Only update the site url if it is actually set final WebServerType ws = AppConfig.getsConfig().getConfig().getWebServer(); if (ws.isSetSiteUrl()) { ws.setSiteUrl(url); AppConfig.getsConfig().saveConfig(); AppConfig.getsConfig().reload(); } }
public String getBaseUrl() { RootConfig getsConfig = AppConfig.getsConfig(); String siteURL = getsConfig.getSiteURL(); WebServerType ws = getsConfig.getConfig().getWebServer(); return removeTrailingSlash(siteURL); }