mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-04-01 18:00:12 +02:00
added client method to fetch a single changeset
This commit is contained in:
@@ -79,6 +79,19 @@ public interface RepositoryUrlProvider extends ModelUrlProvider
|
||||
public String getChangesetUrl(String repositoryId, String path,
|
||||
String revision, int start, int limit);
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param repositoryId
|
||||
* @param revision
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @since 1.12
|
||||
*/
|
||||
public String getChangesetUrl(String repositoryId, String revision);
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -63,6 +63,11 @@ public class RestRepositoryUrlProvider extends RestModelUrlProvider
|
||||
/** Field description */
|
||||
public static final String PART_BROWSE = "browse";
|
||||
|
||||
/**
|
||||
* @since 1.12
|
||||
*/
|
||||
public static final String PART_CHANGESET = "changeset";
|
||||
|
||||
/** Field description */
|
||||
public static final String PART_CHANGESETS = "changesets";
|
||||
|
||||
@@ -177,6 +182,26 @@ public class RestRepositoryUrlProvider extends RestModelUrlProvider
|
||||
PARAMETER_LIMIT, limit).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param repositoryId
|
||||
* @param revision
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @since 1.12
|
||||
*/
|
||||
@Override
|
||||
public String getChangesetUrl(String repositoryId, String revision)
|
||||
{
|
||||
revision = UrlUtil.fixRevision(revision);
|
||||
|
||||
return new UrlBuilder(base).appendUrlPart(repositoryId).appendUrlPart(
|
||||
PART_CHANGESET).appendUrlPart(revision).append(extension).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -64,6 +64,11 @@ public class WUIRepositoryUrlProvider extends WUIModelUrlProvider
|
||||
/** Field description */
|
||||
public static final String VIEW_BLAME = "blame";
|
||||
|
||||
/**
|
||||
* @since 1.12
|
||||
*/
|
||||
public static final String VIEW_CHANGESET = "changeset";
|
||||
|
||||
/** Field description */
|
||||
public static final String VIEW_CONTENT = "content";
|
||||
|
||||
@@ -167,6 +172,26 @@ public class WUIRepositoryUrlProvider extends WUIModelUrlProvider
|
||||
repositoryId).append(start).append(limit).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param repositoryId
|
||||
* @param revision
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @since 1.12
|
||||
*/
|
||||
@Override
|
||||
public String getChangesetUrl(String repositoryId, String revision)
|
||||
{
|
||||
revision = UrlUtil.fixRevision(revision);
|
||||
|
||||
return new WUIUrlBuilder(baseUrl, VIEW_CHANGESET).append(
|
||||
repositoryId).append(revision).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user