Class FxMotifOrderFieldsGenerator

  • All Implemented Interfaces:
    OrderFieldsGenerator

    public class FxMotifOrderFieldsGenerator
    extends java.lang.Object
    implements OrderFieldsGenerator
    An OrderFieldsGenerator implementation that generates default fields for the FxMotif.
    • 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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)
      • 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 interface OrderFieldsGenerator
      • 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 interface OrderFieldsGenerator
      • 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 interface OrderFieldsGenerator
      • 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 interface OrderFieldsGenerator
      • 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 interface OrderFieldsGenerator
      • 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 interface OrderFieldsGenerator