Class DefaultDisplayFields

java.lang.Object
com.caplin.motif.fx.config.DefaultDisplayFields

public final class DefaultDisplayFields extends Object
Static builder methods to build standard DisplayField items
  • Method Details

    • addClient

      public static DisplayFields addClient(DisplayFields displayFields, String entityDescription, String fullName)
      Adds the Client field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      entityDescription - The display name of the TOBO client's entity, e.g. "Caplin Systems Ltd"
      fullName - The display name of the TOBO client, e.g. "John Smith"
    • addCurrencyPair

      public static DisplayFields addCurrencyPair(DisplayFields displayFields, String currencyPair)
      Adds the Currency Pair field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      currencyPair - The base and term currency e.g. GBPUSD
    • addSettlementCurrency

      public static DisplayFields addSettlementCurrency(DisplayFields displayFields, @Nullable String currency)
      Adds the Settlement Currency field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      currency - The settlement currency of a non-deliverable deal, e.g. GBP
    • addSettlementCurrency

      public static DisplayFields addSettlementCurrency(DisplayFields displayFields, @Nullable String currency, String label)
      Adds the Settlement Currency field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      currency - The settlement currency of a non-deliverable deal, e.g. GBP
      label - The label sent down
    • addDate

      public static DisplayFields addDate(DisplayFields displayFields, @Nullable LocalDate date)
      Adds a Date field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      date - Date
    • addTime

      public static DisplayFields addTime(DisplayFields displayFields, @Nullable Instant time)
      Adds a Time field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      time - Time instant
    • addTraderSpotRate

      public static DisplayFields addTraderSpotRate(DisplayFields displayFields, FormattedRate traderSpotRate)
      Adds the Trader Spot Rate field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      traderSpotRate - The trader spot rate
    • addSpotMargin

      public static DisplayFields addSpotMargin(DisplayFields displayFields, FormattedPoints spotMargin)
      Adds the Spot Margin field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      spotMargin - The spot margin
    • addClientSpotRate

      public static DisplayFields addClientSpotRate(DisplayFields displayFields, FormattedRate clientSpotRate)
      Adds the Client Spot Rate field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      clientSpotRate - The client spot rate, e.g. 1.23456
    • addSpotRate

      public static DisplayFields addSpotRate(DisplayFields displayFields, @Nullable FormattedRate spotRate)
      Adds the Spot Rate field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      spotRate - The (client) spot rate, e.g. 1.23456
    • addTotalDeals

      public static DisplayFields addTotalDeals(DisplayFields displayFields, int totalDeals)
      Adds the Total Deals field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      totalDeals - The number of deals included in the confirmation, e.g. for an allocation or reprice.
    • addEstimatedProfit

      public static DisplayFields addEstimatedProfit(DisplayFields displayFields, FormattedAmount profit)
      Adds the Estimated Profit field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      profit - The profit amount
    • addAmount

      public static DisplayFields addAmount(DisplayFields displayFields, @Nullable FormattedAmount amount)
      Adds the Amount field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      amount - The amount
    • addOriginalAmount

      public static DisplayFields addOriginalAmount(DisplayFields displayFields, FormattedAmount originalAmount)
      Adds the Original Amount field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      originalAmount - The original amount
    • addRemainingAmount

      public static DisplayFields addRemainingAmount(DisplayFields displayFields, @Nullable FormattedAmount remainingAmount)
      Adds the Remaining Amount field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      remainingAmount - The remaining amount
    • addFilledAmount

      public static DisplayFields addFilledAmount(DisplayFields displayFields, @Nullable FormattedAmount filledAmount)
      Adds the Filled Amount field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      filledAmount - The filled amount
    • addContraAmount

      public static DisplayFields addContraAmount(DisplayFields displayFields, @Nullable FormattedAmount contraAmount)
      Adds the Contra Amount field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      contraAmount - The contra amount
    • addSettlement

      public static DisplayFields addSettlement(DisplayFields displayFields, @Nullable LocalDate date, @Nullable String tenor)
      Adds the Settlement field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      date - The settlement date
      tenor - Optional tenor, to be displayed in brackets after the settlement date
    • addCostOfServicesHomeCurrency

      public static DisplayFields addCostOfServicesHomeCurrency(DisplayFields displayFields, FormattedAmount serviceCostAmount)
      Adds the Cost of Services (Home Currency) field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      serviceCostAmount - The cost amount
    • addCostOfInstrumentHomeCurrency

      public static DisplayFields addCostOfInstrumentHomeCurrency(DisplayFields displayFields, FormattedAmount costAmount)
      Adds the Cost of Instrument (Home Currency) field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      costAmount - The cost amount
    • addCostOfServicesContraCurrency

      public static DisplayFields addCostOfServicesContraCurrency(DisplayFields displayFields, FormattedAmount serviceContraCostAmount)
      Adds the Cost of Services (Contra Currency) field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      serviceContraCostAmount - The service contra cost amount
    • addCostOfInstrumentContraCurrency

      public static DisplayFields addCostOfInstrumentContraCurrency(DisplayFields displayFields, FormattedAmount contraCostAmount)
      Adds the Cost of Instrument (Contra Currency) field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      contraCostAmount - The service contra cost amount
    • addOriginalSettlement

      public static DisplayFields addOriginalSettlement(DisplayFields displayFields, LocalDate date, @Nullable String tenor)
      Adds the Original Settlement field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      date - The original settlement date
      tenor - Optional tenor, to be displayed in brackets after the settlement date
    • addFixingDate

      public static DisplayFields addFixingDate(DisplayFields displayFields, @Nullable LocalDate date)
      Adds the Fixing Date field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      date - The fixing date
    • addFixingDate

      public static DisplayFields addFixingDate(DisplayFields displayFields, @Nullable LocalDate date, String label)
      Adds the Fixing Date field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      date - The fixing date
    • addFixingSource

      public static DisplayFields addFixingSource(DisplayFields displayFields, @Nullable String fixingSource)
      Adds the Fixing Source field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      fixingSource - The fixing source
    • addFixingSource

      public static DisplayFields addFixingSource(DisplayFields displayFields, @Nullable String fixingSource, String label)
      Adds the Fixing Source field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      fixingSource - The fixing source
    • addEntity

      public static DisplayFields addEntity(DisplayFields displayFields, String entity)
      Adds the Entity field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      entity - The entity description
    • addEntity

      public static DisplayFields addEntity(DisplayFields displayFields, String entity, String label)
      Adds the Entity/Client/Customer field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      entity - The entity description
      label - Label of the Display Field
    • addAccount

      public static DisplayFields addAccount(DisplayFields displayFields, @Nullable String account)
      Adds the Account field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      account - The account description
    • addRate

      public static DisplayFields addRate(DisplayFields displayFields, @Nullable FormattedRate rate)
      Adds the Rate field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      rate - The rate value
    • addTradeID

      public static DisplayFields addTradeID(DisplayFields DisplayFields, String tradeID)
      Adds the Trade ID field to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      tradeID - The Trade ID, e.g. "75e4073d040f"
    • addSubmittedBy

      public static DisplayFields addSubmittedBy(DisplayFields displayFields, @Nullable String user)
      Adds the Submitted by field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      user - The user that submitted the trade, e.g. "Autotrader"
    • addSpotMidRate

      public static DisplayFields addSpotMidRate(DisplayFields DisplayFields, FormattedRate spotMidRate)
      Adds the Mid Spot-Rate field to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      spotMidRate - The Mid-Spot Rate.
    • addAmountWithBuySell

      public static DisplayFields addAmountWithBuySell(DisplayFields DisplayFields, FormattedAmount amount, @Nonnull String buySell)
      Adds the Amount field to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      amount - The amount
      buySell - Whether the amount is bought or sold
    • addAmountWithDealtBuySell

      public static DisplayFields addAmountWithDealtBuySell(DisplayFields DisplayFields, FormattedAmount amount, @Nonnull BuySell buySell, @Nullable String currencyPair, @Nullable String dealtCurrency)
      Adds the Amount field with a buy sell based on dealt currency to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      amount - The amount
      buySell - Whether the amount is bought or sold
      currencyPair - The currency pair.
      dealtCurrency - The dealt currency
    • addForwardPoints

      public static DisplayFields addForwardPoints(DisplayFields displayFields, @Nullable FormattedPoints forwardPoints)
      Adds the Forward Points field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      forwardPoints - The Forward points.
    • addRiskPoints

      public static DisplayFields addRiskPoints(DisplayFields displayFields, @Nullable FormattedPoints riskPoints)
      Adds the Risk Points field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      riskPoints - The Risk points.
    • addForwardMidPoints

      public static DisplayFields addForwardMidPoints(DisplayFields DisplayFields, FormattedPoints midPoints)
      Adds the Mid Points field to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      midPoints - The Mid points.
    • addAllInRate

      public static DisplayFields addAllInRate(DisplayFields displayFields, @Nullable FormattedRate allInRate)
      Adds the All-In-Rate field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      allInRate - The All-In-Rate.
    • addAllInMidRate

      public static DisplayFields addAllInMidRate(DisplayFields displayFields, @Nullable FormattedRate allInMidRate)
      Adds the All-In Mid Rate field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      allInMidRate - The All-In Mid Rate.
    • addStartDate

      public static DisplayFields addStartDate(DisplayFields displayFields, @Nullable LocalDate startDate, @Nullable String startTenor)
      Adds the Start date field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      startDate - The Start date.
    • addEndDate

      public static DisplayFields addEndDate(DisplayFields displayFields, LocalDate endDate, @Nullable String endTenor)
      Adds the End date field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      endDate - The End date.
    • addSwapPoints

      public static DisplayFields addSwapPoints(DisplayFields DisplayFields, FormattedPoints swapPoints)
      Adds the Swap Points field to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      swapPoints - The Swap points.
    • addSwapMidPoints

      public static DisplayFields addSwapMidPoints(DisplayFields DisplayFields, FormattedPoints swapMidPoints)
      Adds the Mid Swap Points field to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      swapMidPoints - The Swap points.
    • addExecutionDateTime

      public static DisplayFields addExecutionDateTime(DisplayFields DisplayFields, Instant executionDateTime)
      Adds the Execution time field to your display-fields configuration
      Parameters:
      DisplayFields - The DisplayFields to add the field to
      executionDateTime - The date and time of the trade, e.g. "12/07/2022 10:21:46"
    • addPurpose

      public static DisplayFields addPurpose(DisplayFields displayFields, @Nullable String purpose)
      Adds the Purpose field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      purpose - The purpose of the trade, e.g. "Commercial"
    • addClient

      public static DisplayFields addClient(DisplayFields displayFields, @Nullable String client)
      Adds the client field i.e. TOBOUser to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      client - The client i.e. TOBOUser
    • addRemarks

      public static DisplayFields addRemarks(DisplayFields displayFields, String remarks)
      Adds the remarks field i.e. Remarks to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      remarks - The remarks i.e. Remarks
    • addTraderRemarks

      public static DisplayFields addTraderRemarks(DisplayFields displayFields, String remarks)
      Adds the remarks field i.e. Remarks to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      remarks - The remarks i.e. Remarks
    • addAmendmentType

      public static DisplayFields addAmendmentType(DisplayFields displayFields, @Nullable String amendmentType)
      Adds the amendment type field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      amendmentType - The type of amendment
    • addAmendmentReason

      public static DisplayFields addAmendmentReason(DisplayFields displayFields, @Nullable String amendmentReason)
      Adds the amendment reason field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      amendmentReason - The reason for the amendment
    • addDefaultSalesAmendmentReasonDisplayFields

      public static DisplayFields addDefaultSalesAmendmentReasonDisplayFields(@Nullable String amendmentType, @Nullable String amendmentReason)
    • addDefaultSpotInterventionFields

      public static DisplayFields addDefaultSpotInterventionFields(DisplayFields displayFields, String clientName, String user, Boolean competition, @Nullable LocalDate settlementDate, @Nullable String settlementTenor, @Nullable String source)
      Creates the default display fields for the Spot Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      source - Where the trade to be intervened originated
    • addDefaultForwardInterventionFields

      public static DisplayFields addDefaultForwardInterventionFields(DisplayFields displayFields, String clientName, String user, Boolean competition, @Nullable LocalDate settlementDate, @Nullable String settlementTenor, @Nullable String source)
      Creates the default display fields for the Fwd Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      source - Where the trade to be intervened originated
    • addDefaultNDFInterventionFields

      public static DisplayFields addDefaultNDFInterventionFields(DisplayFields displayFields, String clientName, Boolean competition, LocalDate fixingDate, String fixingSource, String settlementCurrency, @Nullable String source)
      Creates the default display fields for the NDF Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      competition - Whether there is competition to price the trade to be intervened
      fixingDate - The fixing date
      fixingSource - The fixing source
      settlementCurrency - The settlement currency for a non-deliverable trade
      source - Where the trade to be intervened originated
    • addDefaultSwapInterventionFields

      public static DisplayFields addDefaultSwapInterventionFields(DisplayFields displayFields, String clientName, String user, Boolean competition, FormattedAmount netSpotValue, @Nullable LocalDate nearSettlementDate, @Nullable String nearSettlementTenor, @Nullable LocalDate farSettlementDate, @Nullable String farSettlementTenor, @Nullable String source)
      Creates the default display fields for the Swap Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      nearSettlementDate - The near settlement date
      nearSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      farSettlementDate - The far settlement date
      farSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      source - Where the trade to be intervened originated
      netSpotValue - The net spot value: when you do an uneven swap, the difference in the two legs it's booked against the spot rate
    • addDefaultNDSInterventionFields

      public static DisplayFields addDefaultNDSInterventionFields(DisplayFields displayFields, String clientName, String user, Boolean competition, FormattedAmount netSpotValue, @Nullable LocalDate nearFixingDate, @Nullable LocalDate farFixingDate, @Nullable LocalDate nearSettlementDate, @Nullable String nearSettlementTenor, @Nullable LocalDate farSettlementDate, @Nullable String farSettlementTenor, @Nullable String source)
      Creates the default display fields for the NDS Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      nearSettlementDate - The near settlement date
      nearSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      farSettlementDate - The far settlement date
      farSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      nearFixingDate - The near fixing date
      farFixingDate - The far fixing date
      source - Where the trade to be intervened originated
      netSpotValue - The net spot value: when you do an uneven swap, the difference in the two legs it's booked against the spot rate
    • addDefaultBlockNoSwapInterventionFields

      public static DisplayFields addDefaultBlockNoSwapInterventionFields(DisplayFields displayFields, String clientName, String user, Boolean competition, @Nullable String source)
      Creates the default display fields for the Block (No Swap) Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      source - Where the trade to be intervened originated
    • addDefaultBlockSwapInterventionFields

      public static DisplayFields addDefaultBlockSwapInterventionFields(DisplayFields displayFields, String clientName, String user, Boolean competition, FormattedAmount netSpotValue)
      Creates the default display fields for the Block (Swap) Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      netSpotValue - The net spot value: when you do an uneven swap, the difference in the two legs it's booked against the spot rate
    • addDefaultAllocationInterventionFields

      public static DisplayFields addDefaultAllocationInterventionFields(DisplayFields displayFields, String clientName, String user, String source, @Nullable Boolean competition, @Nullable LocalDate settlementDate, @Nullable String settlementTenor)
      Creates the default display fields for the Allocation Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      source - Where the trade to be intervened originated
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
    • addDefaultTimeOptionInterventionFields

      public static DisplayFields addDefaultTimeOptionInterventionFields(DisplayFields displayFields, String clientName, String user, LocalDate startDate, String startTenor, LocalDate endDate, String endTenor, Boolean competition, String source)
      Creates the default display fields for the TimeOption Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      source - Where the trade to be intervened originated
      startDate - The start date.
      startTenor - The start Tenor.
      endDate - The end date.
      endTenor - The end Tenor.
    • addDefaultSplitInterventionFields

      public static DisplayFields addDefaultSplitInterventionFields(DisplayFields displayFields, String clientName, String user, String source, @Nullable Boolean competition, @Nullable LocalDate settlementDate, @Nullable String settlementTenor)
      Creates the default display fields for the Split Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      source - Where the trade to be intervened originated
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
    • addDefaultAlgoInterventionFields

      public static DisplayFields addDefaultAlgoInterventionFields(DisplayFields displayFields, String clientName, String user, String source, @Nullable Boolean competition, @Nullable LocalDate settlementDate, @Nullable String settlementTenor)
      Creates the default display fields for the Algo Intervention information section:
      Parameters:
      displayFields - The DisplayFields to add the field
      clientName - The entity name / description of a TOBO user e.g. CompanyABC
      user - The TOBO user e.g. user1@caplin.com
      competition - Whether there is competition to price the trade to be intervened
      source - Where the trade to be intervened originated
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
    • addUserInterventionField

      public static DisplayFields addUserInterventionField(DisplayFields displayFields, String user)
      Adds the TOBO user field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      user - The TOBO user e.g. user1@caplin.com
    • addNetSpotValueInterventionField

      public static DisplayFields addNetSpotValueInterventionField(DisplayFields displayFields, FormattedAmount netSpotValue)
      Adds the TOBO user field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      netSpotValue - The net spot value: when you do an uneven swap, the difference in the two legs it's booked against the spot rate
    • addCompetitionInterventionField

      public static DisplayFields addCompetitionInterventionField(DisplayFields displayFields, Boolean competition)
      Adds the competition field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      competition - Whether there is competition to price the trade to be intervened
    • addSourceInterventionField

      public static DisplayFields addSourceInterventionField(DisplayFields displayFields, String source)
      Adds the source field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      source - Where the trade to be intervened originated
    • addBrokerageInterventionField

      public static DisplayFields addBrokerageInterventionField(DisplayFields displayFields, String brokerage)
      Adds the brokerage field to your display-fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to
      brokerage - This is a field that indicates the service charge applied to a trade. It needs to be displayed in case a dealer wants to add zero margin for a trade and in reality after the brokerage is applied it makes a loss for the bank.
    • addDefaultSalesSpotSummaryDisplayFields

      public static DisplayFields addDefaultSalesSpotSummaryDisplayFields(@Nullable String client, @Nullable String account, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable String purpose, @Nullable FormattedAmount amount, @Nonnull BuySell buySell, @Nullable FormattedAmount contraAmount, @Nullable LocalDate settlementDate, @Nullable String settlementTenor, @Nullable FormattedAmount remainingAmount, @Nullable String remarks, @Nullable String traderRemarks, @Nullable String spotTrader, @Nullable String forwardPointsTrader)
      Creates the default display fields for a Sales spot confirmation message:
      Parameters:
      client - The client i.e. TOBOUser
      account - The account description
      executionDate - The execution date
      executionDateTime - The execution date time
      purpose - The purpose of a trade
      amount - The amount
      buySell - Whether the amount is bought or sold
      contraAmount - The contra amount
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      remainingAmount - The remaining amount
      remarks - The comments
      traderRemarks - The trader comments
      spotTrader - The Spot trader
      forwardPointsTrader - The Forward points trader
    • addDefaultSalesFwdSummaryDisplayFields

      public static DisplayFields addDefaultSalesFwdSummaryDisplayFields(@Nullable String client, @Nullable String account, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable String purpose, @Nullable FormattedAmount amount, @Nonnull BuySell buySell, @Nullable FormattedAmount contraAmount, @Nullable LocalDate settlementDate, @Nullable String settlementTenor, @Nullable FormattedAmount remainingAmount, @Nullable String remarks, @Nullable String traderRemarks, @Nullable String spotTrader, @Nullable String forwardPointsTrader)
      Creates the default display fields for a Sales forward confirmation message:
      Parameters:
      client - The client i.e. TOBOUser
      account - The account description
      executionDate - The execution date
      executionDateTime - The execution date time
      purpose - The purpose of a trade
      amount - The amount
      buySell - Whether the amount is bought or sold
      contraAmount - The contra amount
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      remainingAmount - The remaining amount
      remarks - The comments
      traderRemarks - The trader comments
      spotTrader - The Spot trader
      forwardPointsTrader - The Forward points trader
    • addDefaultSalesTimeOptionSummaryDisplayFields

      public static DisplayFields addDefaultSalesTimeOptionSummaryDisplayFields(@Nullable String client, @Nullable String account, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable String purpose, @Nullable LocalDate startDate, @Nullable String startTenor, @Nullable LocalDate endDate, @Nullable String endTenor, @Nullable FormattedRate spotRate, @Nullable FormattedPoints riskPoints, @Nullable FormattedAmount amount, @Nonnull BuySell buySell, @Nullable FormattedAmount contraAmount, @Nullable FormattedAmount remainingAmount, @Nullable FormattedAmount filledAmount, @Nullable String remarks, @Nullable String traderRemarks, @Nullable String spotTrader, @Nullable String forwardPointsTrader)
      Creates the default display fields for a Sales time option confirmation message:
      Parameters:
      client - The client i.e. TOBOUser
      account - The account description
      executionDate - The execution date
      executionDateTime - The execution date time
      purpose - The purpose of a trade
      startDate - The start date
      startTenor - The start Tenor
      endDate - The end date
      endTenor - The end Tenor
      spotRate - The (client) spot rate, e.g. 1.23456
      riskPoints - The risk points
      amount - The amount
      buySell - Whether the amount is bought or sold
      contraAmount - The contra amount
      remainingAmount - The remaining amount
      filledAmount - The filled amount
      remarks - The comments
      traderRemarks - The trader comments
      spotTrader - The Spot trader
      forwardPointsTrader - The Forward points trader
    • addDefaultSalesNDFSummaryDisplayFields

      public static DisplayFields addDefaultSalesNDFSummaryDisplayFields(@Nullable String client, @Nullable String account, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable String purpose, @Nullable LocalDate fixingDate, @Nullable String fixingSource, @Nullable String settlementCurrency, @Nullable FormattedAmount amount, @Nonnull BuySell buySell, @Nullable FormattedAmount contraAmount, @Nullable LocalDate settlementDate, @Nullable String settlementTenor, @Nullable FormattedAmount remainingAmount, @Nullable String remarks, @Nullable String traderRemarks, @Nullable String spotTrader, @Nullable String forwardPointsTrader)
      Creates the default display fields for a Sales NDF confirmation message:
      Parameters:
      client - The client i.e. TOBOUser
      account - The account description
      executionDate - The execution date
      executionDateTime - The execution date time
      purpose - The purpose of a trade
      fixingDate - The fixing date
      fixingSource - The fixing source
      settlementCurrency - The settlement currency for a non-deliverable trade
      amount - The amount
      buySell - Whether the amount is bought or sold
      contraAmount - The contra amount
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      remainingAmount - The remaining amount
      remarks - The comments
      traderRemarks - The trader comments
      spotTrader - The Spot trader
      forwardPointsTrader - The Forward points trader
    • addDefaultSalesSwapSummaryDisplayFields

      public static DisplayFields addDefaultSalesSwapSummaryDisplayFields(@Nullable String client, @Nullable String account, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable String purpose, @Nullable FormattedAmount nearAmount, @Nonnull BuySell nearBuySell, @Nullable FormattedAmount nearContraAmount, @Nullable LocalDate nearSettlementDate, @Nullable String nearSettlementTenor, @Nullable FormattedRate nearAllInRate, @Nullable FormattedAmount farAmount, @Nonnull BuySell farBuySell, @Nullable FormattedAmount farContraAmount, @Nullable LocalDate farSettlementDate, @Nullable String farSettlementTenor, @Nullable FormattedRate farAllInRate, @Nullable FormattedAmount remainingAmount, @Nullable String remarks, @Nullable String traderRemarks, @Nullable String spotTrader, @Nullable String forwardPointsTrader)
      Creates the default display fields for a Sales swap confirmation message:
      Parameters:
      client - The client i.e. TOBOUser
      account - The account description
      executionDate - The execution date
      executionDateTime - The execution date time
      purpose - The purpose of a trade
      nearAmount - The near amount
      nearBuySell - Whether the amount is bought or sold
      nearContraAmount - The near contra amount
      nearSettlementDate - The near settlement date
      nearSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      nearAllInRate - The near All-In-Rate
      farAmount - The far amount
      farBuySell - Whether the amount is bought or sold
      farContraAmount - The far contra amount
      farSettlementDate - The far settlement date
      farSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      farAllInRate - The far All-In-Rate
      remainingAmount - The remaining amount
      remarks - The comments
      traderRemarks - The trader comments
      spotTrader - The Spot trader
      forwardPointsTrader - The Forward points trader
    • addDefaultSalesNDSSummaryDisplayFields

      public static DisplayFields addDefaultSalesNDSSummaryDisplayFields(@Nullable String client, @Nullable String account, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable String purpose, @Nullable String fixingSource, @Nullable String settlementCurrency, @Nullable FormattedAmount nearAmount, @Nonnull BuySell nearBuySell, @Nullable FormattedAmount nearContraAmount, @Nullable LocalDate nearSettlementDate, @Nullable String nearSettlementTenor, @Nullable LocalDate nearFixingDate, @Nullable FormattedRate nearAllInRate, @Nullable FormattedAmount farAmount, @Nonnull BuySell farBuySell, @Nullable FormattedAmount farContraAmount, @Nullable LocalDate farSettlementDate, @Nullable String farSettlementTenor, @Nullable LocalDate farFixingDate, @Nullable FormattedRate farAllInRate, @Nullable String remarks, @Nullable String traderRemarks, @Nullable String spotTrader, @Nullable String forwardPointsTrader)
      Creates the default display fields for a Sales NDS confirmation message:
      Parameters:
      client - The client i.e. TOBOUser
      account - The account description
      executionDate - The execution date
      executionDateTime - The execution date time
      purpose - The purpose of a trade
      nearAmount - The amount
      nearBuySell - Whether the amount is bought or sold
      nearContraAmount - The contra amount
      nearSettlementDate - The settlement date
      nearSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      nearAllInRate - The near All-In-Rate
      farAmount - The far amount
      farBuySell - Whether the amount is bought or sold
      farContraAmount - The far contra amount
      farSettlementDate - The far settlement date
      farSettlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      farAllInRate - The far All-In-Rate
      remarks - The comments
      traderRemarks - The trader comments
      spotTrader - The Spot trader
      forwardPointsTrader - The Forward points trader
    • addDefaultSalesAllocationConfirmationFields

      public static DisplayFields addDefaultSalesAllocationConfirmationFields(DisplayFields displayFields, @Nullable String entityDescription, @Nullable String fullName, @Nullable String currencyPair, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable FormattedRate traderSpotRate, @Nullable FormattedPoints spotMargin, @Nullable FormattedRate clientSpotRate, @Nullable Integer totalDeals, @Nullable FormattedAmount profit)
      Adds the default deliverable deal display fields for a Sales Allocation confirmation message: - Client - Currency Pair - Execution Date Time - Trader Spot Rate - Spot Margin - Client Spot Rate - Total Deals - Estimated Profit
      Parameters:
      displayFields - The DisplayFields to add the field to
      entityDescription - The value matching the EntityDescription fields on a trade confirmation.
      fullName - The value matching the FullName field on a trade confirmation
      currencyPair - The value matching the CurrencyPair field on a trade confirmation.
      executionDate - The execution date
      executionDateTime - The execution date time
      traderSpotRate - The value matching the TraderSpotRate field on your Sales trade confirmation
      spotMargin - The value matching the SpotMargin field on your Sales trade confirmation@param spotMargin
      clientSpotRate - The value matching the SpotRate field on your trade confirmation
      totalDeals - The number of allocated or repriced deals.
      profit - The value matching the Profit field on your trade confirmation
    • addDefaultSalesAllocationConfirmationFields

      public static DisplayFields addDefaultSalesAllocationConfirmationFields(DisplayFields displayFields, @Nullable String entityDescription, @Nullable String fullName, @Nullable String currencyPair, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable FormattedRate traderSpotRate, @Nullable FormattedPoints spotMargin, @Nullable FormattedRate clientSpotRate, @Nullable Integer totalDeals, @Nullable FormattedAmount profit, @Nullable String settlementCurrency, @Nullable String fixingSource)
      Adds the default display fields for a Sales Allocation confirmation message: - Client - Currency Pair - Settlement Currency (if non-deliverable) - Fixing Source (if non-deliverable) - Date - Time - Trader Spot Rate - Spot Margin - Client Spot Rate - Total Deals - Estimated Profit
      Parameters:
      displayFields - The DisplayFields to add the field to
      entityDescription - The value matching the EntityDescription fields on a trade confirmation.
      fullName - The value matching the FullName field on a trade confirmation
      currencyPair - The value matching the CurrencyPair field on a trade confirmation.
      executionDate - The execution date in ISO format.
      executionDateTime - The execution date time in ISO format. May optionally contain milliseconds.
      traderSpotRate - The value matching the TraderSpotRate field on your Sales trade confirmation
      spotMargin - The value matching the SpotMargin field on your Sales trade confirmation@param spotMargin
      clientSpotRate - The value matching the SpotRate field on your trade confirmation
      totalDeals - The number of allocated or repriced deals.
      profit - The value matching the Profit field on your trade confirmation
      settlementCurrency - The settlement currency for a non-deliverable deal
      fixingSource - The fixing source for a non-deliverable deal
    • addDefaultAllocationConfirmationFields

      public static DisplayFields addDefaultAllocationConfirmationFields(DisplayFields displayFields, @Nullable String entityDescription, @Nullable String fullName, @Nullable String currencyPair, @Nullable LocalDate executionDate, @Nullable Instant executionDateTime, @Nullable FormattedRate spotRate, @Nullable Integer totalDeals, @Nullable FormattedAmount profit)
      Adds the default display fields for an Allocation confirmation message: - Client - Currency Pair - Date - Time - Spot Rate - Total Deals - Estimated Profit
      Parameters:
      displayFields - The DisplayFields to add the field to
      entityDescription - The value matching the EntityDescription fields on a trade confirmation.
      fullName - The value matching the FullName field on a trade confirmation
      currencyPair - The value matching the CurrencyPair field on a trade confirmation.
      executionDate - The date the trade was executed.
      executionDateTime - The execution date time in ISO format. May optionally contain milliseconds.param executionDateTime
      spotRate - The value matching the SpotRate field on your trade confirmation
      totalDeals - The number of allocated or repriced deals.
      profit - The value matching the Profit field on your trade confirmation
    • addDefaultSalesAllocationDetailsUpdateFields

      public static DisplayFields addDefaultSalesAllocationDetailsUpdateFields(DisplayFields displayFields, @Nullable FormattedAmount originalAmount, @Nullable FormattedAmount originalContraAmount, @Nullable String currencyPair, @Nullable LocalDate originalSettlementDate, @Nullable String originalTenor, @Nullable String originalAccount, @Nullable FormattedRate originalRate)
      Adds the default deliverable deal display fields for a Sales Allocation details-update message: - Original Amount - Original Contra - Currency Pair - Settlement - Account - Original Rate
      Parameters:
      displayFields - The DisplayFields to add the field to
      originalAmount - The original amount
      originalContraAmount - The original contra amount
      currencyPair - The currency pair
      originalSettlementDate - The original settlement date
      originalTenor - Optional original tenor
      originalAccount - The original account
      originalRate - The original rate
    • addDefaultSalesAllocationDetailsUpdateFields

      public static DisplayFields addDefaultSalesAllocationDetailsUpdateFields(DisplayFields displayFields, @Nullable FormattedAmount originalAmount, @Nullable FormattedAmount originalContraAmount, @Nullable String currencyPair, @Nullable LocalDate originalSettlementDate, @Nullable String originalTenor, @Nullable String originalAccount, @Nullable FormattedRate originalRate, @Nullable LocalDate fixingDate, @Nullable String settlementCurrency, @Nullable String fixingSource)
      Adds the default display fields for a Sales Allocation details-update message: - Amount - Contra Amount - Currency Pair - Settlement Currency (if non-deliverable) - Settlement - Fixing Date (if non-deliverable) - Fixing Source (if non-deliverable) - Account - Original Rate
      Parameters:
      displayFields - The DisplayFields to add the field to
      originalAmount - The original amount
      originalContraAmount - The original contra amount
      currencyPair - The currency pair
      originalSettlementDate - The original settlement date
      originalTenor - Optional original tenor
      originalAccount - The original account
      originalRate - The original rate
      fixingDate - The fixing date for a non-deliverable trade
      settlementCurrency - The settlement currency for a non-deliverable trade
      fixingSource - The fixing source for a non-deliverable trade
    • addDefaultAllocationDetailsUpdateFields

      public static DisplayFields addDefaultAllocationDetailsUpdateFields(DisplayFields displayFields, @Nullable FormattedAmount originalAmount, @Nullable FormattedAmount originalContraAmount, @Nullable String currencyPair, @Nullable LocalDate originalSettlementDate, @Nullable String originalTenor, @Nullable String originalAccount, @Nullable FormattedRate originalRate)
      Adds the default deliverable deal display fields for an Allocation details-update message: - Original Amount - Original Contra - Currency Pair - Settlement - Account - Original Rate
      Parameters:
      displayFields - The DisplayFields to add the field to
      originalAmount - The original amount
      originalContraAmount - The original contra amount
      currencyPair - The currency pair
      originalSettlementDate - The original settlement date
      originalTenor - Optional original tenor
      originalAccount - The original account
      originalRate - The original rate
    • addDefaultAllocationDetailsUpdateFields

      public static DisplayFields addDefaultAllocationDetailsUpdateFields(DisplayFields displayFields, @Nullable FormattedAmount originalAmount, @Nullable FormattedAmount originalContraAmount, @Nullable String currencyPair, @Nullable LocalDate originalSettlementDate, @Nullable String originalTenor, @Nullable String originalAccount, @Nullable FormattedRate originalRate, @Nullable LocalDate fixingDate)
      Adds the default display fields for an Allocation details-update message: - Original Amount - Original Contra - Currency Pair - Settlement - Original Fixing Date (if non-deliverable) - Account - Original Rate
      Parameters:
      displayFields - The DisplayFields to add the field to
      originalAmount - The original amount
      originalContraAmount - The original contra amount
      currencyPair - The currency pair
      originalSettlementDate - The original settlement date
      originalTenor - Optional original tenor
      originalAccount - The original account
      originalRate - The original rate
      fixingDate - The fixing date for a non-deliverable trade
    • addGeneralOutrightFields

      public static DisplayFields addGeneralOutrightFields(DisplayFields DisplayFields, @Nullable String entity, @Nullable String account, @Nullable String tradeID, @Nullable Instant executionDateTime, @Nullable String currencyPair, @Nullable String user)
      Adds the leg independent display fields for an outright trade
      Parameters:
      DisplayFields - The DisplayFields to add the field to.
      account - The account that completed the trade.
      tradeID - The trade ID.
      executionDateTime - The date and time of execution
      currencyPair - The currency pair in the trade.
      user - The user associated with the trade.
    • addSpotTradeDetailsFields

      public static DisplayFields addSpotTradeDetailsFields(DisplayFields displayFields, @Nonnull BuySell buySell, @Nullable FormattedAmount amount, @Nullable FormattedAmount contraAmount, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable LocalDate settlementDate, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount, @Nullable String settlementTenor, @Nullable String currencyPair)
      Adds spot trade leg fields
      Parameters:
      displayFields - The DisplayFields to add the field to.
      buySell - Whether the amount is bought or sold
      amount - The dealt amount
      contraAmount - The dealt amount
      spotRate - The (client) spot rate, e.g. 1.23456
      spotMidRate - The Mid-Spot Rate.
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      currencyPair - The currency pair
    • addGenericFwdLegFields

      public static DisplayFields addGenericFwdLegFields(DisplayFields displayFields, @Nonnull BuySell buySell, @Nullable FormattedAmount amount, @Nullable FormattedAmount contraAmount, @Nullable FormattedPoints forwardPoints, @Nullable FormattedPoints forwardMidPoints, @Nullable String currencyPair)
      Adds generic fwd leg fields (look at other adders to see what it can be combined with):
      Parameters:
      displayFields - The DisplayFields to add the field to.
      buySell - Whether the amount is bought or sold
      amount - The dealt amount
      contraAmount - The dealt amount
      forwardPoints - The Forward points.
      forwardMidPoints - The Forward Mid points.
      currencyPair - The currency pair
    • addOtherFwdLegFields

      public static DisplayFields addOtherFwdLegFields(DisplayFields displayFields, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable FormattedRate allInRate, @Nullable FormattedRate allInMidRate, @Nullable LocalDate settlementDate, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount, @Nullable String settlementTenor)
      adds fwd specific leg fields use with addGenericFwdLegFields to create fwd leg fields
      Parameters:
      displayFields - The DisplayFields to add the field to.
      spotRate - The (client) spot rate, e.g. 1.23456
      spotMidRate - The Mid-Spot Rate.
      allInRate - The All-In-Rate.
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
    • addNdfLegFields

      public static DisplayFields addNdfLegFields(DisplayFields displayFields, @Nullable LocalDate fixingDate)
      adds ndf specific leg fields can be used with addOtherFwdLegFields and addGenericFwdLegFields to create ndf leg fields
      Parameters:
      displayFields - The DisplayFields to add the field to
      fixingDate - The fixing date
    • addTimeOptionFields

      public static DisplayFields addTimeOptionFields(DisplayFields displayFields, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable LocalDate startDate, @Nullable String startTenor, @Nullable LocalDate endDate, @Nullable String endTenor, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount)
      adds time option specific leg fields can be used with addGenericFwdLegFields to create time option leg fields
      Parameters:
      displayFields - The DisplayFields to add the field to.
      spotRate - The (client) spot rate, e.g. 1.23456
      spotMidRate - The Mid-Spot Rate.
      startDate - The Start date.
      startTenor - The Start Tenor.
      endDate - The End date.
      endTenor - The End Tenor.
    • addSwapSpotFields

      public static DisplayFields addSwapSpotFields(DisplayFields displayFields, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable FormattedPoints swapPoints, @Nullable FormattedPoints swapMidPoints)
      Adds swap specific leg independent fields
      Parameters:
      displayFields - The DisplayFields to add the field to.
      spotRate - The (client) spot rate, e.g. 1.23456
      spotMidRate - The Mid-Spot Rate.
      swapPoints - The Swap points.
    • addSwapLegFields

      public static DisplayFields addSwapLegFields(DisplayFields displayFields, @Nullable FormattedRate allInRate, @Nullable FormattedRate allInMidRate, @Nullable LocalDate settlementDate, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount, @Nullable String settlementTenor)
      Adds swap specific leg fields use with addGenericFwdLegFields to create a set of swap leg fields
      Parameters:
      displayFields - The DisplayFields to add the field to.
      allInRate - The All-In-Rate.
      settlementDate - The settlement date
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
    • addExtraFields

      public static DisplayFields addExtraFields(DisplayFields displayFields, @Nullable String remarks)
      Adds additional fields that are not specific to a trade type (eg. Comments)
      Parameters:
      displayFields - The DisplayFields to add the field to.
      remarks - The comments.
    • addSalesExtraFields

      public static DisplayFields addSalesExtraFields(DisplayFields displayFields, @Nullable String remarks, @Nullable String traderRemarks)
      Adds additional fields that are not specific to a trade type (eg. Comments)
      Parameters:
      displayFields - The DisplayFields to add the field to.
      remarks - The comments.
      traderRemarks - The trader comments.
    • addDefaultOutrightPostTradeHistoryFields

      public static DisplayFields addDefaultOutrightPostTradeHistoryFields(DisplayFields displayFields, @Nullable FormattedAmount originalAmount, @Nullable LocalDate settlementDate, @Nullable String settlementTenor, @Nullable FormattedAmount remainingAmount)
      Adds the post trade history fields to your display fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to.
      originalAmount - The original amount of the parent trade
      settlementDate - The settlement date of the parent trade
      settlementTenor - Optional tenor, to be displayed in brackets after the settlement date
      remainingAmount - The remaining amount of the parent trade
    • addDefaultTimeOptionPostTradeHistoryFields

      public static DisplayFields addDefaultTimeOptionPostTradeHistoryFields(DisplayFields displayFields, @Nullable FormattedAmount originalAmount, @Nullable LocalDate startDate, @Nullable String startTenor, @Nullable LocalDate endDate, @Nullable String endTenor, @Nullable FormattedAmount remainingAmount)
      Adds the post trade history fields to your display fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to.
      originalAmount - The original amount of the parent trade
      startDate - The start date of the trade
      startTenor - Optional tenor, to be displayed in brackets after the start date
      endDate - The end date of the trade
      endTenor - Optional tenor, to be displayed in brackets after the end date
      remainingAmount - The remaining amount of the parent trade
    • addDefaultDrawdownTradeDetailsFields

      public static DisplayFields addDefaultDrawdownTradeDetailsFields(DisplayFields displayFields, @Nullable FormattedRate rate, @Nullable LocalDate startDate, @Nullable String startTenor, @Nullable LocalDate endDate, @Nullable String endTenor)
      Adds the post trade history fields to your display fields configuration
      Parameters:
      displayFields - The DisplayFields to add the field to.
      rate - The rate of the original time option
      startDate - The start date of the original time option
      startTenor - Optional tenor, to be displayed in brackets after the start date
      endDate - The end date of the original time option
      endTenor - Optional tenor, to be displayed in brackets after the end date
    • fromFieldsMap

      public static DisplayFields fromFieldsMap(Map<String,String> fieldsMap, String messageClassName)
      Derive a complete display-fields configuration from a confirmation message.

      Currently only confirmation messages for FX Professional are supported. Confirmation messages for FX Sales will be supported in a future release. With this, the possible values for messageClassName are "TicketSpotTradeConfirmation", "TicketForwardTradeConfirmation" and "TicketSwapTradeConfirmation".

      Parameters:
      fieldsMap - the confirmation message, where the keys are the confirmation message fields and the values ate the confirmation message field values
      messageClassName - the name of a builder from com.caplin.generated.motif.fx.tradeconfirmation as a string
      Returns:
      a complete display-fields configuration, or null if messageClassName is not one of the supported values listed above
    • addDefaultSpotSummaryDisplayFields

      public static DisplayFields addDefaultSpotSummaryDisplayFields(DisplayFields displayFields, @Nullable String entity, @Nullable String account, @Nullable String tradeId, @Nullable Instant executionDateTime, @Nullable String currencyPair, @Nullable String submittedBy, @Nonnull BuySell buySell, @Nullable FormattedAmount amount, @Nullable FormattedAmount contraAmount, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable LocalDate settlementDate, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount, @Nullable String settlementTenor, @Nullable String remarks)
      Creates the default display fields for a spot confirmation message:
      Parameters:
      account - the account description
      tradeId - the trade ID
      executionDateTime - the execution date time
      currencyPair - the currency pair
      submittedBy - the user who submitted the trade
      buySell - whether the amount is bought or sold
      amount - the amount
      contraAmount - the contra amount
      spotRate - the spot rate
      spotMidRate - the spot mid rate
      settlementDate - the settlement date
      settlementTenor - optional tenor, to be displayed in brackets after the settlement date
      remarks - optional comments
    • addDefaultFwdSummaryDisplayFields

      public static DisplayFields addDefaultFwdSummaryDisplayFields(DisplayFields displayFields, @Nullable String entity, @Nullable String account, @Nullable String tradeId, @Nullable Instant executionDateTime, @Nullable String currencyPair, @Nullable String submittedBy, @Nonnull BuySell buySell, @Nullable FormattedAmount amount, @Nullable FormattedAmount contraAmount, @Nullable FormattedPoints fwdPoints, @Nullable FormattedPoints fwdMidPoints, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable FormattedRate allInRate, @Nullable FormattedRate allInMidRate, @Nullable LocalDate settlementDate, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount, @Nullable String settlementTenor, @Nullable String remarks)
      Creates the default display fields for a forward confirmation message:
      Parameters:
      account - the account description
      tradeId - the trade ID
      executionDateTime - the execution date time
      currencyPair - the currency pair
      submittedBy - the user who submitted the trade
      buySell - whether the amount is bought or sold
      amount - the amount
      contraAmount - the contra amount
      fwdPoints - the forward points
      fwdMidPoints - the forward mid points
      spotRate - the spot rate
      spotMidRate - the spot mid rate
      allInRate - the all in rate
      settlementDate - the settlement date
      settlementTenor - optional tenor, to be displayed in brackets after the settlement date
      remarks - optional comments
    • addDefaultNdfSummaryDisplayFields

      public static DisplayFields addDefaultNdfSummaryDisplayFields(DisplayFields displayFields, @Nullable String entity, @Nullable String account, @Nullable String tradeId, @Nullable Instant executionDateTime, @Nullable String currencyPair, @Nullable String submittedBy, @Nonnull BuySell buySell, @Nullable FormattedAmount amount, @Nullable FormattedAmount contraAmount, @Nullable FormattedPoints fwdPoints, @Nullable FormattedPoints fwdMidPoints, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable FormattedRate allInRate, @Nullable FormattedRate allInMidRate, @Nullable LocalDate settlementDate, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount, @Nullable String settlementTenor, @Nullable LocalDate fixingDate, @Nullable String remarks)
      Creates the default display fields for a NDF confirmation message:
      Parameters:
      account - the account description
      tradeId - the trade ID
      executionDateTime - the execution date time
      currencyPair - the currency pair
      submittedBy - the user who submitted the trade
      buySell - whether the amount is bought or sold
      amount - the amount
      contraAmount - the contra amount
      fwdPoints - the forward points
      fwdMidPoints - the forward mid points
      spotRate - the spot rate
      spotMidRate - the spot mid rate
      allInRate - the all in rate
      settlementDate - the settlement date
      settlementTenor - optional tenor, to be displayed in brackets after the settlement date
      fixingDate - the fixing date
      remarks - optional comments
    • addDefaultTimeOptionSummaryDisplayFields

      public static DisplayFields addDefaultTimeOptionSummaryDisplayFields(DisplayFields displayFields, @Nullable String entity, @Nullable String account, @Nullable String tradeId, @Nullable Instant executionDateTime, @Nullable String currencyPair, @Nullable String submittedBy, @Nonnull BuySell buySell, @Nullable FormattedAmount amount, @Nullable FormattedAmount contraAmount, @Nullable FormattedPoints fwdPoints, @Nullable FormattedPoints fwdMidPoints, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable LocalDate startDate, @Nullable String startTenor, @Nullable LocalDate settlementDate, @Nullable String settlementTenor, @Nullable FormattedAmount serviceCostAmount, @Nullable FormattedAmount serviceContraCostAmount, @Nullable FormattedAmount costAmount, @Nullable FormattedAmount contraCostAmount, @Nullable String remarks)
      Creates the default display fields for a time option confirmation message:
      Parameters:
      account - the account description
      tradeId - the trade ID
      executionDateTime - the execution date time
      currencyPair - the currency pair
      submittedBy - the user who submitted the trade
      buySell - whether the amount is bought or sold
      amount - the amount
      contraAmount - the contra amount
      fwdPoints - the forward points
      fwdMidPoints - the forward mid points
      spotRate - the spot rate
      spotMidRate - the spot mid rate
      startDate - the start date
      settlementDate - the end date
      remarks - optional comments
    • addDefaultSwapSummaryDisplayFields

      public static DisplayFields addDefaultSwapSummaryDisplayFields(DisplayFields displayFields, @Nullable String entity, @Nullable String account, @Nullable String tradeId, @Nullable Instant executionDateTime, @Nullable String currencyPair, @Nullable String submittedBy, @Nullable FormattedRate spotRate, @Nullable FormattedRate spotMidRate, @Nullable FormattedPoints swapPoints, @Nullable FormattedPoints swapMidPoints, @Nonnull BuySell nearBuySell, @Nullable FormattedAmount nearAmount, @Nullable FormattedAmount nearContraAmount, @Nullable FormattedPoints nearFwdPoints, @Nullable FormattedPoints nearFwdMidPoints, @Nullable FormattedRate nearAllInRate, @Nullable FormattedRate nearAllInMidRate, @Nullable LocalDate nearSettlementDate, @Nullable FormattedAmount nearServiceCostAmount, @Nullable FormattedAmount nearServiceContraCostAmount, @Nullable FormattedAmount nearCostAmount, @Nullable FormattedAmount nearContraCostAmount, @Nullable String nearSettlementTenor, @Nonnull BuySell farBuySell, @Nullable FormattedAmount farAmount, @Nullable FormattedAmount farContraAmount, @Nullable FormattedPoints farFwdPoints, @Nullable FormattedPoints farFwdMidPoints, @Nullable FormattedRate farAllInRate, @Nullable FormattedRate farAllInMidRate, @Nullable LocalDate farSettlementDate, @Nullable FormattedAmount farServiceCostAmount, @Nullable FormattedAmount farServiceContraCostAmount, @Nullable FormattedAmount farCostAmount, @Nullable FormattedAmount farContraCostAmount, @Nullable String farSettlementTenor, @Nullable String remarks)
      Creates the default display fields for a time option confirmation message:
      Parameters:
      account - the account description
      tradeId - the trade ID
      executionDateTime - the execution date time
      currencyPair - the currency pair
      submittedBy - the user who submitted the trade
      spotRate - the spot rate
      spotMidRate - the spot mid rate
      swapPoints - the swap points
      swapMidPoints - the swap mid points
      nearBuySell - whether the amount is bought or sold for the near leg
      nearAmount - the amount for the near leg
      nearContraAmount - the contra amount for the near leg
      nearFwdPoints - the forward points for the near leg
      nearFwdMidPoints - the forward mid points for the near leg
      nearAllInRate - the all in rate for the near leg
      nearSettlementDate - the settlement date for the near leg
      nearSettlementTenor - optional tenor for the near leg, to be displayed in brackets after the settlement date
      farBuySell - whether the amount is bought or sold for the far leg
      farAmount - the amount for the far leg
      farContraAmount - the contra amount for the far leg
      farFwdPoints - the forward points for the far leg
      farFwdMidPoints - the forward mid points for the far leg
      farAllInRate - the all in rate for the far leg
      farSettlementDate - the settlement date for the far leg
      farSettlementTenor - optional tenor for the far leg, to be displayed in brackets after the settlement date
      remarks - optional comments
    • addReasonHeader

      public static DisplayFields addReasonHeader(DisplayFields displayFields, @Nullable String tenor, @Nullable String startDate)
    • addReasonSecondaryHeader

      public static DisplayFields addReasonSecondaryHeader(DisplayFields displayFields)
    • createReasonBlock

      public static DisplayFields createReasonBlock(@Nullable String tenor, @Nullable String startDate)
    • addExtraFieldsToDisplay

      public static void addExtraFieldsToDisplay(DisplayFields displayFields, String remarks, String traderRemarks)
      Adds an extra field to the display fields container.
      Parameters:
      displayFields - The container to which the extra fields will be added
      remarks - The comments.
      traderRemarks - The trader comments.
    • addSpotTrader

      public static DisplayFields addSpotTrader(DisplayFields displayFields, String spotTrader)
      Adds the Spot trader
      Parameters:
      displayFields - The DisplayFields to add the field to
      spotTrader - The Spot trader
    • addForwardPointsTrader

      public static DisplayFields addForwardPointsTrader(DisplayFields displayFields, String forwardPointsTrader)
      Adds the Forward points trader
      Parameters:
      displayFields - The DisplayFields to add the field to
      forwardPointsTrader - The Forward points trader