Package au.com.dius.pact.core.model
Class V4Pact
-
-
Field Summary
Fields Modifier and Type Field Description private final List<Interaction>
interactions
private Consumer
consumer
private Provider
provider
private final Map<String, Object>
metadata
private final PactSource
source
-
Constructor Summary
Constructors Constructor Description V4Pact(Consumer consumer, Provider provider, List<Interaction> interactions, Map<String, Object> metadata, PactSource source)
V4Pact(Consumer consumer, Provider provider, List<Interaction> interactions, Map<String, Object> metadata)
V4Pact(Consumer consumer, Provider provider, List<Interaction> interactions)
V4Pact(Consumer consumer, Provider provider)
-
Method Summary
Modifier and Type Method Description List<Interaction>
getInteractions()
Returns all the interactions of the pact Pact
sortInteractions()
Returns a pact with the interactions sorted Map<String, Object>
toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document. Pact
mergeInteractions(List<Interaction> interactions)
Merges all the interactions into this Pact Result<RequestResponsePact, String>
asRequestResponsePact()
Converts this Pact into a concrete V3 HTTP Pact, if able to Result<MessagePact, String>
asMessagePact()
Converts this Pact into a concrete V3 Message Pact, if able to Boolean
isV4Pact()
If this Pact is a V4 Pact Result.Ok<V4Pact>
asV4Pact()
Converts this Pact into a concrete V4 Pact Boolean
isRequestResponsePact()
If this pact is a synchronous request/response pact Result<Boolean, String>
compatibleTo(Pact other)
If this pact is compatible with the other pact. List<PluginData>
pluginData()
Boolean
requiresPlugins()
final Boolean
hasInteractionsOfType(V4InteractionType interactionType)
Returns true if the Pact has interactions of the given type -
Methods inherited from class au.com.dius.pact.core.model.BasePact
equals, fileForPact, getConsumer, getMetadata, getProvider, getSource, hashCode, setConsumer, setProvider, toString, validateForVersion, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
V4Pact
V4Pact(Consumer consumer, Provider provider, List<Interaction> interactions, Map<String, Object> metadata, PactSource source)
-
V4Pact
V4Pact(Consumer consumer, Provider provider, List<Interaction> interactions, Map<String, Object> metadata)
-
V4Pact
V4Pact(Consumer consumer, Provider provider, List<Interaction> interactions)
-
-
Method Detail
-
getInteractions
List<Interaction> getInteractions()
Returns all the interactions of the pact
-
sortInteractions
Pact sortInteractions()
Returns a pact with the interactions sorted
-
toMap
Map<String, Object> toMap(PactSpecVersion pactSpecVersion)
Returns a Map representation of this pact for the purpose of generating a JSON document.
-
mergeInteractions
Pact mergeInteractions(List<Interaction> interactions)
Merges all the interactions into this Pact
-
asRequestResponsePact
Result<RequestResponsePact, String> asRequestResponsePact()
Converts this Pact into a concrete V3 HTTP Pact, if able to
-
asMessagePact
Result<MessagePact, String> asMessagePact()
Converts this Pact into a concrete V3 Message Pact, if able to
-
isRequestResponsePact
Boolean isRequestResponsePact()
If this pact is a synchronous request/response pact
-
compatibleTo
Result<Boolean, String> compatibleTo(Pact other)
If this pact is compatible with the other pact. Pacts are compatible if they have the same provider and they are the same type
-
pluginData
List<PluginData> pluginData()
-
requiresPlugins
Boolean requiresPlugins()
-
hasInteractionsOfType
final Boolean hasInteractionsOfType(V4InteractionType interactionType)
Returns true if the Pact has interactions of the given type
-
-
-
-