added changeset client api

This commit is contained in:
Sebastian Sdorra
2011-09-16 10:27:07 +02:00
parent 5f876c7da9
commit 0db94e2cb7
5 changed files with 238 additions and 0 deletions

View File

@@ -82,6 +82,10 @@ public class ScmUrlProvider
/** Field description */
public static final String URLPATTERN_BROWSE = "repositories/{0}/browse";
/** Field description */
public static final String URLPATTERN_CHANGESETS =
"repositories/{0}/changesets";
/** Field description */
public static final String URLPATTERN_CONTENT = "repositories/{0}/content";
@@ -227,6 +231,38 @@ public class ScmUrlProvider
return url;
}
/**
* Method description
*
*
* @param repositoryId
* @since 1.8
*
* @param start
* @param limit
* @return
*/
public String getRepositoryChangesetUrl(String repositoryId, int start,
int limit)
{
String url = MessageFormat.format(getResourceUrl(URLPATTERN_CHANGESETS),
repositoryId);
String s = "?";
if (start >= 0)
{
url = url.concat(s).concat("start=").concat(String.valueOf(start));
s = "&";
}
if (limit > 0)
{
url = url.concat(s).concat("limit=").concat(String.valueOf(limit));
}
return url;
}
/**
* Method description
*