Class ScmStubDownloaderBuilder
- java.lang.Object
-
- org.springframework.cloud.contract.stubrunner.ScmStubDownloaderBuilder
-
- All Implemented Interfaces:
StubDownloaderBuilder,org.springframework.core.io.ProtocolResolver
public final class ScmStubDownloaderBuilder extends Object implements StubDownloaderBuilder
Builds aStubDownloaderto work with contracts and stubs from a SCM.- Since:
- 2.0.0
- Author:
- Marcin Grzejszczak
-
-
Constructor Summary
Constructors Constructor Description ScmStubDownloaderBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StubDownloaderbuild(StubRunnerOptions stubRunnerOptions)static booleanisProtocolAccepted(String url)Does any of the accepted protocols matches the URL of the repository.org.springframework.core.io.Resourceresolve(String location, org.springframework.core.io.ResourceLoader resourceLoader)
-
-
-
Method Detail
-
isProtocolAccepted
public static boolean isProtocolAccepted(String url)
Does any of the accepted protocols matches the URL of the repository.- Parameters:
url- - of the repository- Returns:
trueif the protocol is accepted
-
build
public StubDownloader build(StubRunnerOptions stubRunnerOptions)
- Specified by:
buildin interfaceStubDownloaderBuilder- Parameters:
stubRunnerOptions- options of Stub Runner- Returns:
StubDownloaderinstance ofnullif current parameters don't allow building the instance
-
resolve
public org.springframework.core.io.Resource resolve(String location, org.springframework.core.io.ResourceLoader resourceLoader)
- Specified by:
resolvein interfaceorg.springframework.core.io.ProtocolResolver- Specified by:
resolvein interfaceStubDownloaderBuilder
-
-