Class ScmStubDownloaderBuilder
java.lang.Object
org.springframework.cloud.contract.stubrunner.ScmStubDownloaderBuilder
- All Implemented Interfaces:
StubDownloaderBuilder,org.springframework.core.io.ProtocolResolver
Builds a
StubDownloader to work with contracts and stubs from a SCM.- Since:
- 2.0.0
- Author:
- Marcin Grzejszczak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(StubRunnerOptions stubRunnerOptions) static booleanisProtocolAccepted(String url) Does any of the accepted protocols matches the URL of the repository.org.springframework.core.io.Resource
-
Constructor Details
-
ScmStubDownloaderBuilder
public ScmStubDownloaderBuilder()
-
-
Method Details
-
isProtocolAccepted
Does any of the accepted protocols matches the URL of the repository.- Parameters:
url- - of the repository- Returns:
trueif the protocol is accepted
-
build
- 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
-