Class PartyMappingHelper

java.lang.Object
cdm.legaldocumentation.contract.processor.PartyMappingHelper

public class PartyMappingHelper extends Object
Helper class for FpML mapper processors.

Handles Counterparty and AncillaryParty. A new instance is created for each TradableProduct.

  • 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

      public void setCounterpartyRoleEnum(String partyReference, Consumer<CounterpartyRoleEnum> setter)
      Maps party external reference to CounterpartyRoleEnum, then sets on the given builder.
    • translatePartyExternalReference

      public String translatePartyExternalReference(String partyExternalReference)
      Apply party external reference translation if translator provided
    • getBothCounterpartiesCollectedFuture

      public CompletableFuture<Map<String,CounterpartyRoleEnum>> 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

      public void addAncillaryParty(String partyExternalReference, AncillaryRoleEnum role)
      Add role and associated partyExternalReference to tradableProduct.ancillaryParty.