improve AbstractRepositoryHandler

This commit is contained in:
Sebastian Sdorra
2010-09-20 09:51:27 +02:00
parent c24d099273
commit 1581e31398
4 changed files with 74 additions and 62 deletions

View File

@@ -18,7 +18,7 @@ import javax.xml.bind.annotation.XmlRootElement;
* @author Sebastian Sdorra
*/
@XmlRootElement(name = "config")
public class HgConfig
public class HgConfig extends BasicRepositoryConfig
{
/**
@@ -29,16 +29,6 @@ public class HgConfig
//~--- get methods ----------------------------------------------------------
/**
* Method description
*
*
* @return
*/
public String getBaseUrl()
{
return baseUrl;
}
/**
* Method description
@@ -64,17 +54,6 @@ public class HgConfig
//~--- set methods ----------------------------------------------------------
/**
* Method description
*
*
* @param baseUrl
*/
public void setBaseUrl(String baseUrl)
{
this.baseUrl = baseUrl;
}
/**
* Method description
*
@@ -99,8 +78,6 @@ public class HgConfig
//~--- fields ---------------------------------------------------------------
/** Field description */
private String baseUrl;
/** Field description */
private String hgBinary = "hg";

View File

@@ -261,31 +261,6 @@ public class HgRepositoryHandler extends AbstractRepositoryHandler<HgConfig>
//~--- methods --------------------------------------------------------------
/**
* Method description
*
*
* @param repository
*
* @return
*/
@Override
protected String buildUrl(Repository repository)
{
String url = config.getBaseUrl();
if (Util.isNotEmpty(url))
{
if (!url.endsWith("/"))
{
url = url.concat("/");
}
url = url.concat(repository.getName());
}
return url;
}
//~--- get methods ----------------------------------------------------------