Package com.caplin.motif.fx.config
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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DisplayFields
addAccount(DisplayFields displayFields, String account)
Adds the Account field to your display-fields configurationstatic DisplayFields
addAmount(DisplayFields displayFields, FormattedAmount amount)
Adds the Amount field to your display-fields configurationstatic DisplayFields
addClient(DisplayFields displayFields, String entityDescription, String fullName)
Adds the Client field to your display-fields configurationstatic DisplayFields
addClientSpotRate(DisplayFields displayFields, FormattedRate clientSpotRate)
Adds the Client Spot Rate field to your display-fields configurationstatic DisplayFields
addContraAmount(DisplayFields displayFields, FormattedAmount contraAmount)
Adds the Contra Amount field to your display-fields configurationstatic DisplayFields
addCurrencyPair(DisplayFields displayFields, String currencyPair)
Adds the Currency Pair field to your display-fields configurationstatic DisplayFields
addDate(DisplayFields displayFields, LocalDate date)
Adds a Date field to your display-fields configurationstatic DisplayFields
addDefaultAllocationConfirmationFields(DisplayFields displayFields, String entityDescription, String fullName, String currencyPair, LocalDate executionDate, Instant executionDateTime, FormattedRate spotRate, Integer totalDeals, FormattedAmount profit)
Adds the default display fields for an Allocation confirmation message: - Client - Currency Pair - Date - Time - Spot Rate - Total Deals - Estimated Profitstatic DisplayFields
addDefaultAllocationDetailsUpdateFields(DisplayFields displayFields, FormattedAmount originalAmount, FormattedAmount originalContraAmount, String currencyPair, LocalDate originalSettlementDate, String originalTenor, String originalAccount, FormattedRate originalRate)
Adds the default deliverable deal display fields for an Allocation details-update message: - Original Amount - Original Contra - Currency Pair - Settlement - Account - Original Ratestatic DisplayFields
addDefaultAllocationDetailsUpdateFields(DisplayFields displayFields, FormattedAmount originalAmount, FormattedAmount originalContraAmount, String currencyPair, LocalDate originalSettlementDate, String originalTenor, String originalAccount, FormattedRate originalRate, 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 Ratestatic DisplayFields
addDefaultSalesAllocationConfirmationFields(DisplayFields displayFields, String entityDescription, String fullName, String currencyPair, LocalDate executionDate, Instant executionDateTime, FormattedRate traderSpotRate, FormattedPoints spotMargin, FormattedRate clientSpotRate, Integer totalDeals, 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 Profitstatic DisplayFields
addDefaultSalesAllocationConfirmationFields(DisplayFields displayFields, String entityDescription, String fullName, String currencyPair, LocalDate executionDate, Instant executionDateTime, FormattedRate traderSpotRate, FormattedPoints spotMargin, FormattedRate clientSpotRate, Integer totalDeals, FormattedAmount profit, String settlementCurrency, 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 Profitstatic DisplayFields
addDefaultSalesAllocationDetailsUpdateFields(DisplayFields displayFields, FormattedAmount originalAmount, FormattedAmount originalContraAmount, String currencyPair, LocalDate originalSettlementDate, String originalTenor, String originalAccount, 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 Ratestatic DisplayFields
addDefaultSalesAllocationDetailsUpdateFields(DisplayFields displayFields, FormattedAmount originalAmount, FormattedAmount originalContraAmount, String currencyPair, LocalDate originalSettlementDate, String originalTenor, String originalAccount, FormattedRate originalRate, LocalDate fixingDate, String settlementCurrency, 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 Ratestatic DisplayFields
addEstimatedProfit(DisplayFields displayFields, FormattedAmount profit)
Adds the Estimated Profit field to your display-fields configurationstatic DisplayFields
addFixingDate(DisplayFields displayFields, LocalDate date)
Adds the Fixing Date field to your display-fields configurationstatic DisplayFields
addFixingSource(DisplayFields displayFields, String fixingSource)
Adds the Fixing Source field to your display-fields configurationstatic DisplayFields
addRate(DisplayFields displayFields, FormattedRate rate)
Adds the Rate field to your display-fields configurationstatic DisplayFields
addSettlement(DisplayFields displayFields, LocalDate date, String tenor)
Adds the Settlement field to your display-fields configurationstatic DisplayFields
addSettlementCurrency(DisplayFields displayFields, String currency)
Adds the Settlement Currency field to your display-fields configurationstatic DisplayFields
addSpotMargin(DisplayFields displayFields, FormattedPoints spotMargin)
Adds the Spot Margin field to your display-fields configurationstatic DisplayFields
addSpotRate(DisplayFields displayFields, FormattedRate spotRate)
Adds the Spot Rate field to your display-fields configurationstatic DisplayFields
addTime(DisplayFields displayFields, Instant time)
Adds a Time field to your display-fields configurationstatic DisplayFields
addTotalDeals(DisplayFields displayFields, int totalDeals)
Adds the Total Deals field to your display-fields configurationstatic DisplayFields
addTraderSpotRate(DisplayFields displayFields, FormattedRate traderSpotRate)
Adds the Trader Spot Rate field to your display-fields configuration
-
-
-
Method Detail
-
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 toentityDescription
- 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 tocurrencyPair
- The base and term currency e.g. GBPUSD
-
addSettlementCurrency
public static DisplayFields addSettlementCurrency(DisplayFields displayFields, String currency)
Adds the Settlement Currency field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field tocurrency
- The settlement currency of a non-deliverable deal, e.g. GBP
-
addDate
public static DisplayFields addDate(DisplayFields displayFields, LocalDate date)
Adds a Date field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field todate
- Date
-
addTime
public static DisplayFields addTime(DisplayFields displayFields, Instant time)
Adds a Time field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field totime
- 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 totraderSpotRate
- 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 tospotMargin
- 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 toclientSpotRate
- The client spot rate, e.g. 1.23456
-
addSpotRate
public static DisplayFields addSpotRate(DisplayFields displayFields, FormattedRate spotRate)
Adds the Spot Rate field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field tospotRate
- 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 tototalDeals
- 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 toprofit
- The profit amount
-
addAmount
public static DisplayFields addAmount(DisplayFields displayFields, FormattedAmount amount)
Adds the Amount field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field toamount
- The amount
-
addContraAmount
public static DisplayFields addContraAmount(DisplayFields displayFields, FormattedAmount contraAmount)
Adds the Contra Amount field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field tocontraAmount
- The contra amount
-
addSettlement
public static DisplayFields addSettlement(DisplayFields displayFields, LocalDate date, @Nullable String tenor)
Adds the Settlement field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field todate
- The settlement datetenor
- Optional tenor, to be displayed in brackets after the settlement date
-
addFixingDate
public static DisplayFields addFixingDate(DisplayFields displayFields, LocalDate date)
Adds the Fixing Date field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field todate
- The fixing date
-
addFixingSource
public static DisplayFields addFixingSource(DisplayFields displayFields, String fixingSource)
Adds the Fixing Source field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field tofixingSource
- The fixing source
-
addAccount
public static DisplayFields addAccount(DisplayFields displayFields, String account)
Adds the Account field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field toaccount
- The account description
-
addRate
public static DisplayFields addRate(DisplayFields displayFields, FormattedRate rate)
Adds the Rate field to your display-fields configuration- Parameters:
displayFields
- The DisplayFields to add the field torate
- The rate value
-
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 toentityDescription
- The value matching the EntityDescription fields on a trade confirmation.fullName
- The value matching the FullName field on a trade confirmationcurrencyPair
- The value matching the CurrencyPair field on a trade confirmation.executionDate
- The execution dateexecutionDateTime
- The execution date timetraderSpotRate
- The value matching the TraderSpotRate field on your Sales trade confirmationspotMargin
- The value matching the SpotMargin field on your Sales trade confirmation@param spotMarginclientSpotRate
- The value matching the SpotRate field on your trade confirmationtotalDeals
- 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 toentityDescription
- The value matching the EntityDescription fields on a trade confirmation.fullName
- The value matching the FullName field on a trade confirmationcurrencyPair
- 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 confirmationspotMargin
- The value matching the SpotMargin field on your Sales trade confirmation@param spotMarginclientSpotRate
- The value matching the SpotRate field on your trade confirmationtotalDeals
- The number of allocated or repriced deals.profit
- The value matching the Profit field on your trade confirmationsettlementCurrency
- The settlement currency for a non-deliverable dealfixingSource
- 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 toentityDescription
- The value matching the EntityDescription fields on a trade confirmation.fullName
- The value matching the FullName field on a trade confirmationcurrencyPair
- 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 executionDateTimespotRate
- The value matching the SpotRate field on your trade confirmationtotalDeals
- 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 tooriginalAmount
- The original amountoriginalContraAmount
- The original contra amountcurrencyPair
- The currency pairoriginalSettlementDate
- The original settlement dateoriginalTenor
- Optional original tenororiginalAccount
- The original accountoriginalRate
- 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 tooriginalAmount
- The original amountoriginalContraAmount
- The original contra amountcurrencyPair
- The currency pairoriginalSettlementDate
- The original settlement dateoriginalTenor
- Optional original tenororiginalAccount
- The original accountoriginalRate
- The original ratefixingDate
- The fixing date for a non-deliverable tradesettlementCurrency
- The settlement currency for a non-deliverable tradefixingSource
- 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 tooriginalAmount
- The original amountoriginalContraAmount
- The original contra amountcurrencyPair
- The currency pairoriginalSettlementDate
- The original settlement dateoriginalTenor
- Optional original tenororiginalAccount
- The original accountoriginalRate
- 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 tooriginalAmount
- The original amountoriginalContraAmount
- The original contra amountcurrencyPair
- The currency pairoriginalSettlementDate
- The original settlement dateoriginalTenor
- Optional original tenororiginalAccount
- The original accountoriginalRate
- The original ratefixingDate
- The fixing date for a non-deliverable trade
-
-