Class PartyMappingHelper
java.lang.Object
cdm.legaldocumentation.contract.processor.PartyMappingHelper
Helper class for FpML mapper processors.
Handles Counterparty and AncillaryParty. A new instance is created for each TradableProduct.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.rosetta.model.lib.path.RosettaPath -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAncillaryParty(String partyExternalReference, AncillaryRoleEnum role) Add role and associated partyExternalReference to tradableProduct.ancillaryParty.static Optional<PartyMappingHelper> getInstance(com.regnosys.rosetta.common.translation.MappingContext mappingContext) Get an instance of this party mapping helper from the MappingContext params.static PartyMappingHelpergetInstanceOrThrow(com.regnosys.rosetta.common.translation.MappingContext mappingContext) Get an instance of this party mapping helper from the MappingContext params, or if not found throw exception.voidsetAncillaryRoleEnum(com.rosetta.model.lib.path.RosettaPath modelPath, com.regnosys.rosetta.common.translation.Path synonymPath, Consumer<AncillaryRoleEnum> setter, AncillaryRoleEnum role) Set role with given setter and add associated partyExternalReference to tradableProduct.ancillaryParty.voidsetCounterpartyRoleEnum(com.rosetta.model.lib.path.RosettaPath modelPath, com.regnosys.rosetta.common.translation.Path synonymPath, Consumer<CounterpartyRoleEnum> setter) Looks up party external reference synonym path, and maps value to CounterpartyRoleEnum, then sets on the given builder.voidsetCounterpartyRoleEnum(String partyReference, Consumer<CounterpartyRoleEnum> setter) Maps party external reference to CounterpartyRoleEnum, then sets on the given builder.translatePartyExternalReference(String partyExternalReference) Apply party external reference translation if translator provided
-
Field Details
-
PRODUCT_SUB_PATH
public static final com.rosetta.model.lib.path.RosettaPath PRODUCT_SUB_PATH
-
-
Method Details
-
getInstance
public static Optional<PartyMappingHelper> getInstance(com.regnosys.rosetta.common.translation.MappingContext mappingContext) Get an instance of this party mapping helper from the MappingContext params. -
getInstanceOrThrow
public static PartyMappingHelper getInstanceOrThrow(com.regnosys.rosetta.common.translation.MappingContext mappingContext) Get an instance of this party mapping helper from the MappingContext params, or if not found throw exception. -
setCounterpartyRoleEnum
public void setCounterpartyRoleEnum(com.rosetta.model.lib.path.RosettaPath modelPath, com.regnosys.rosetta.common.translation.Path synonymPath, Consumer<CounterpartyRoleEnum> setter) Looks up party external reference synonym path, and maps value to CounterpartyRoleEnum, then sets on the given builder. -
setCounterpartyRoleEnum
Maps party external reference to CounterpartyRoleEnum, then sets on the given builder. -
translatePartyExternalReference
Apply party external reference translation if translator provided -
getBothCounterpartiesCollectedFuture
-
setAncillaryRoleEnum
public void setAncillaryRoleEnum(com.rosetta.model.lib.path.RosettaPath modelPath, com.regnosys.rosetta.common.translation.Path synonymPath, Consumer<AncillaryRoleEnum> setter, AncillaryRoleEnum role) Set role with given setter and add associated partyExternalReference to tradableProduct.ancillaryParty. -
addAncillaryParty
Add role and associated partyExternalReference to tradableProduct.ancillaryParty.
-