Class FxMotifOrderFieldsGenerator
- java.lang.Object
-
- com.caplin.motif.fx.ret.orders.extension.fields.FxMotifOrderFieldsGenerator
-
- All Implemented Interfaces:
OrderFieldsGenerator
public class FxMotifOrderFieldsGenerator extends java.lang.Object implements OrderFieldsGenerator
AnOrderFieldsGenerator
implementation that generates default fields for the FxMotif.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.caplin.motif.fx.ret.orders.fields.OrderFieldsGenerator
OrderFieldsGenerator.Context
-
-
Constructor Summary
Constructors Constructor Description FxMotifOrderFieldsGenerator(OrderStatusGenerator statusGenerator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AllowedAction>
getAllowableActionsForOrder(com.caplin.ret.trapi.fx.FXOrder order)
java.util.Map<java.lang.String,java.lang.String>
getFieldsForCreation(com.caplin.motif.fx.trading.orders.submission.strategy.MotifOrderStrategy strategy, com.caplin.motif.fx.trading.orders.submission.Order order, DerivedData derivedData, java.lang.String orderRequestId)
java.util.Map<java.lang.String,java.lang.String>
getFieldsForDelete(com.caplin.ret.trapi.fx.order.OrderEvent event)
Returns a map of field names to values retrieved from the given OrderFillEvent / user when an order is deleted.java.util.Map<java.lang.String,java.lang.String>
getFieldsForFill(com.caplin.ret.trapi.fx.order.OrderFillEvent event, java.lang.String ssoUser, java.util.Map<java.lang.String,java.lang.String> fieldsForFill)
java.util.Map<java.lang.String,java.lang.String>
getFieldsFromOrder(com.caplin.ret.trapi.fx.FXOrder order)
Returns a map of fields to values retrieved from the given FXOrder.java.lang.String
getOrderActionFailStatus(AllowedAction allowedAction)
java.lang.String
getOrderAssetClass(com.caplin.ret.trapi.fx.FXOrder order)
java.lang.String
getOrderStatus(com.caplin.ret.trapi.fx.FXOrder order)
Returns the order status from the order.java.lang.String
getTemperature(java.lang.String orderStatus, com.caplin.ret.trapi.fx.FXOrder order)
Gets the temperature from either the orderStatus or order.static java.lang.String
getVWAP(com.caplin.ret.trapi.fx.FXOrder order)
Also known as the volume weighted average price (VWAP)void
initialise(OrderFieldsGenerator.Context context)
boolean
showOrderOnActivityBlotter(java.lang.String status)
Determines whether the order should be displayed for the given status.boolean
showTemperature(java.lang.String status)
Determines whether the temperature should be displayed for the given status.
-
-
-
Constructor Detail
-
FxMotifOrderFieldsGenerator
public FxMotifOrderFieldsGenerator(OrderStatusGenerator statusGenerator)
-
-
Method Detail
-
getVWAP
public static java.lang.String getVWAP(com.caplin.ret.trapi.fx.FXOrder order)
Also known as the volume weighted average price (VWAP)
-
initialise
public void initialise(OrderFieldsGenerator.Context context)
- Specified by:
initialise
in interfaceOrderFieldsGenerator
-
showTemperature
public boolean showTemperature(java.lang.String status)
Description copied from interface:OrderFieldsGenerator
Determines whether the temperature should be displayed for the given status.- Specified by:
showTemperature
in interfaceOrderFieldsGenerator
-
showOrderOnActivityBlotter
public boolean showOrderOnActivityBlotter(java.lang.String status)
Description copied from interface:OrderFieldsGenerator
Determines whether the order should be displayed for the given status.- Specified by:
showOrderOnActivityBlotter
in interfaceOrderFieldsGenerator
-
getOrderAssetClass
public java.lang.String getOrderAssetClass(com.caplin.ret.trapi.fx.FXOrder order)
- Specified by:
getOrderAssetClass
in interfaceOrderFieldsGenerator
-
getAllowableActionsForOrder
public java.util.List<AllowedAction> getAllowableActionsForOrder(com.caplin.ret.trapi.fx.FXOrder order)
- Specified by:
getAllowableActionsForOrder
in interfaceOrderFieldsGenerator
-
getTemperature
public java.lang.String getTemperature(java.lang.String orderStatus, com.caplin.ret.trapi.fx.FXOrder order)
Description copied from interface:OrderFieldsGenerator
Gets the temperature from either the orderStatus or order.- Specified by:
getTemperature
in interfaceOrderFieldsGenerator
-
getOrderStatus
public java.lang.String getOrderStatus(com.caplin.ret.trapi.fx.FXOrder order)
Description copied from interface:OrderFieldsGenerator
Returns the order status from the order.- Specified by:
getOrderStatus
in interfaceOrderFieldsGenerator
-
getOrderActionFailStatus
public java.lang.String getOrderActionFailStatus(AllowedAction allowedAction)
- Specified by:
getOrderActionFailStatus
in interfaceOrderFieldsGenerator
-
getFieldsForDelete
public java.util.Map<java.lang.String,java.lang.String> getFieldsForDelete(com.caplin.ret.trapi.fx.order.OrderEvent event)
Description copied from interface:OrderFieldsGenerator
Returns a map of field names to values retrieved from the given OrderFillEvent / user when an order is deleted.- Specified by:
getFieldsForDelete
in interfaceOrderFieldsGenerator
-
getFieldsForCreation
public java.util.Map<java.lang.String,java.lang.String> getFieldsForCreation(com.caplin.motif.fx.trading.orders.submission.strategy.MotifOrderStrategy strategy, com.caplin.motif.fx.trading.orders.submission.Order order, DerivedData derivedData, java.lang.String orderRequestId)
- Specified by:
getFieldsForCreation
in interfaceOrderFieldsGenerator
-
getFieldsForFill
public java.util.Map<java.lang.String,java.lang.String> getFieldsForFill(com.caplin.ret.trapi.fx.order.OrderFillEvent event, java.lang.String ssoUser, java.util.Map<java.lang.String,java.lang.String> fieldsForFill)
- Specified by:
getFieldsForFill
in interfaceOrderFieldsGenerator
-
getFieldsFromOrder
public java.util.Map<java.lang.String,java.lang.String> getFieldsFromOrder(com.caplin.ret.trapi.fx.FXOrder order)
Description copied from interface:OrderFieldsGenerator
Returns a map of fields to values retrieved from the given FXOrder.- Specified by:
getFieldsFromOrder
in interfaceOrderFieldsGenerator
-
-