Created
August 30, 2011 21:21
-
-
Save ifedorenko/1182082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO this looks like a total hack! Is there a better way to get repository base url? | |
private String getRepoUrl( Request request, Repository repository ) | |
{ | |
String repoUrl = getContextRoot( request ).toString(); | |
if ( !repoUrl.endsWith( "/" ) ) | |
{ | |
repoUrl = repoUrl + "/"; | |
} | |
repoUrl = repoUrl + "content/repositories/" + repository.getId(); | |
return repoUrl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment