mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
added changeset client api
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user