Interface ContractConverter<T>
-
- Type Parameters:
T- - type to which we want to convert the contract
- All Superinterfaces:
ContractReader<T>,ContractStorer<T>
public interface ContractConverter<T> extends ContractStorer<T>, ContractReader<T>
- Since:
- 1.1.0
- Author:
- Marcin Grzejszczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<Contract>convertFrom(File file)TconvertTo(Collection<Contract> contract)Converts the givenContractto aContractConverterrepresentation.booleanisAccepted(File file)Should this file be accepted by the converter.-
Methods inherited from interface org.springframework.cloud.contract.spec.ContractReader
read
-
Methods inherited from interface org.springframework.cloud.contract.spec.ContractStorer
store
-
-
-
-
Method Detail
-
isAccepted
boolean isAccepted(File file)
Should this file be accepted by the converter. Can use the file extension to check if the conversion is possible.- Parameters:
file- - file to be considered for conversion- Returns:
- -
trueif the given implementation can convert the file
-
convertFrom
Collection<Contract> convertFrom(File file)
- Parameters:
file- - file to convert- Returns:
- -
Contractrepresentation of the file
-
convertTo
T convertTo(Collection<Contract> contract)
Converts the givenContractto aContractConverterrepresentation.- Parameters:
contract- - the parsed contract- Returns:
- -
ContractConverterthe type to which we do the conversion
-
-