protected String getBaseUrl() throws RepositoryAdminException { String applicationUrl = archivaAdministration.getUiConfiguration().getApplicationUrl(); if ( StringUtils.isNotBlank( applicationUrl ) ) { return applicationUrl; } return httpServletRequest.getScheme() + "://" + httpServletRequest.getServerName() + ( httpServletRequest.getServerPort() == 80 ? "" : ":" + httpServletRequest.getServerPort() ) + httpServletRequest.getContextPath(); }
protected String getBaseUrl() throws RepositoryAdminException { String applicationUrl = archivaAdministration.getUiConfiguration().getApplicationUrl(); if ( StringUtils.isNotBlank( applicationUrl ) ) { return applicationUrl; } return httpServletRequest.getScheme() + "://" + httpServletRequest.getServerName() + ( httpServletRequest.getServerPort() == 80 ? "" : ":" + httpServletRequest.getServerPort() ) + httpServletRequest.getContextPath(); }
@Override public String getApplicationUrl() throws ArchivaRestServiceException { try { return archivaAdministration.getUiConfiguration().getApplicationUrl(); } catch ( RepositoryAdminException e ) { throw new ArchivaRestServiceException( e.getMessage(), e ); } }
@Override public String getApplicationUrl() throws ArchivaRestServiceException { try { return archivaAdministration.getUiConfiguration().getApplicationUrl(); } catch ( RepositoryAdminException e ) { throw new ArchivaRestServiceException( e.getMessage(), e ); } }
@Override public void setUiConfiguration( UiConfiguration uiConfiguration ) throws ArchivaRestServiceException { try { // fix for MRM-1757 // strip any trailing '/' at the end of the url so it won't affect url/link calculations in UI uiConfiguration.setApplicationUrl(StringUtils.stripEnd(uiConfiguration.getApplicationUrl(), "/")); archivaAdministration.updateUiConfiguration( uiConfiguration ); } catch ( RepositoryAdminException e ) { throw new ArchivaRestServiceException( e.getMessage(), e ); } }
@Override public void setUiConfiguration( UiConfiguration uiConfiguration ) throws ArchivaRestServiceException { try { // fix for MRM-1757 // strip any trailing '/' at the end of the url so it won't affect url/link calculations in UI uiConfiguration.setApplicationUrl(StringUtils.stripEnd(uiConfiguration.getApplicationUrl(), "/")); archivaAdministration.updateUiConfiguration( uiConfiguration ); } catch ( RepositoryAdminException e ) { throw new ArchivaRestServiceException( e.getMessage(), e ); } }