added method to create repository client from remote repository

This commit is contained in:
Sebastian Sdorra
2012-07-14 14:47:01 +02:00
parent eb93fead2a
commit 5dbce7037d
2 changed files with 33 additions and 4 deletions

View File

@@ -34,7 +34,6 @@ package sonia.scm.repository.client.api;
//~--- non-JDK imports --------------------------------------------------------
import sonia.scm.repository.client.spi.RepositoryClientFactoryProvider;
import sonia.scm.repository.client.spi.RepositoryClientProvider;
//~--- JDK imports ------------------------------------------------------------
@@ -72,10 +71,26 @@ public final class RepositoryClientFactory
*/
public RepositoryClient create(File main, File workingCopy)
{
RepositoryClientProvider clientProvider = provider.create(main,
workingCopy);
return new RepositoryClient(clientProvider);
return new RepositoryClient(provider.create(main, workingCopy));
}
/**
* Method description
*
*
* @param url
* @param username
* @param password
* @param workingCopy
*
* @return
*/
public RepositoryClient create(String url, String username, String password,
File workingCopy)
{
return new RepositoryClient(provider.create(url, username, password,
workingCopy));
}
//~--- fields ---------------------------------------------------------------

View File

@@ -53,4 +53,18 @@ public interface RepositoryClientFactoryProvider
* @return
*/
public RepositoryClientProvider create(File main, File workingCopy);
/**
* Method description
*
*
* @param url
* @param username
* @param password
* @param workingCopy
*
* @return
*/
public RepositoryClientProvider create(String url, String username,
String password, File workingCopy);
}