mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
added method to create repository client from remote repository
This commit is contained in:
@@ -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 ---------------------------------------------------------------
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user