mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-05 22:29:11 +01:00
mark url of repository as deprecated
This commit is contained in:
@@ -39,6 +39,7 @@ import com.google.common.base.Objects;
|
||||
|
||||
import sonia.scm.BasicPropertiesAware;
|
||||
import sonia.scm.ModelObject;
|
||||
import sonia.scm.util.HttpUtil;
|
||||
import sonia.scm.util.Util;
|
||||
import sonia.scm.util.ValidationUtil;
|
||||
|
||||
@@ -164,6 +165,22 @@ public class Repository extends BasicPropertiesAware implements ModelObject
|
||||
repository.setArchived(archived);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the url of the repository.
|
||||
*
|
||||
*
|
||||
* @param baseUrl base url of the server including the context path
|
||||
*
|
||||
* @return url of the repository
|
||||
* @since 1.17
|
||||
*/
|
||||
public String createUrl(String baseUrl)
|
||||
{
|
||||
String url = HttpUtil.append(baseUrl, type);
|
||||
|
||||
return HttpUtil.append(url, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the {@link Repository} is the same as the obj argument.
|
||||
*
|
||||
@@ -343,7 +360,9 @@ public class Repository extends BasicPropertiesAware implements ModelObject
|
||||
*
|
||||
*
|
||||
* @return base url
|
||||
* @deprecated use {@link #createUrl(String)}
|
||||
*/
|
||||
@Deprecated
|
||||
public String getUrl()
|
||||
{
|
||||
return url;
|
||||
@@ -511,7 +530,9 @@ public class Repository extends BasicPropertiesAware implements ModelObject
|
||||
*
|
||||
*
|
||||
* @param url base url
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public void setUrl(String url)
|
||||
{
|
||||
this.url = url;
|
||||
@@ -550,6 +571,8 @@ public class Repository extends BasicPropertiesAware implements ModelObject
|
||||
/** Field description */
|
||||
private String type;
|
||||
|
||||
/** Field description */
|
||||
/**
|
||||
* @deprecated use {@link #createUrl(java.lang.String)} instead
|
||||
*/
|
||||
private String url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user