Class StrategyBuilder

java.lang.Object
com.caplin.motif.fx.trading.orders.details.StrategyBuilder

@Deprecated public class StrategyBuilder extends Object
Deprecated.
This class provides a builder which is used to construct a strategy which consists or one or more orders and may be populated with fields.
See Also:
  • Constructor Details

    • StrategyBuilder

      public StrategyBuilder()
      Deprecated.
      Creates a new StrategyBuilder.
    • StrategyBuilder

      public StrategyBuilder(Strategy previousStrategy)
      Deprecated.
      Creates a new StrategyBuilder with previous fieldSets.
      Parameters:
      previousStrategy - Previous strategy.
  • Method Details

    • addOrderBuilder

      public OrderBuilder addOrderBuilder(int legID, Order previousOrder)
      Deprecated.

      Adds an OrderBuilder to this instance of StrategyBuilder with the specified leg ID and previous field set.

      This instance of StrategyBuilderHelper retains a reference to the OrderBuilder so that it can be used to build the corresponding Order when you call build().

      Parameters:
      legID - The leg ID of the OrderBuilder.
      previousOrder - The previous order.
      Returns:
      The same instance of OrderBuilder, so that this method can be chained.
    • addOrderBuilder

      public OrderBuilder addOrderBuilder(int legID)
      Deprecated.

      Adds an OrderBuilder to this instance of StrategyBuilder with the specified leg ID.

      This instance of StrategyBuilderHelper retains a reference to the OrderBuilder so that it can be used to build the corresponding Order when you call build().

      Parameters:
      legID - The leg ID of the OrderBuilder.
      Returns:
      The same instance of OrderBuilder, so that this method can be chained.
    • getOrderBuilder

      public OrderBuilder getOrderBuilder(int legID)
      Deprecated.
      Gets an OrderBuilder with the specified leg ID. The OrderBuilder must have been previously registered by calling addOrderBuilder(int) for this method to be able to return it.
      Parameters:
      legID - The leg ID of the OrderBuilder to retrieve.
      Returns:
      The OrderBuilder with the provided leg ID, or null if no OrderBuilder can be found.
    • getOrderBuilder

      public OrderBuilder getOrderBuilder(String orderID)
      Deprecated.
      Gets an OrderBuilder with the specified order ID. The OrderBuilder must have been previously registered by calling addOrderBuilder(int) and the order ID must have been set by calling OrderBuilder.setOrderId(String) in order for this method to be able to return it.
      Parameters:
      orderID - The order ID of the OrderBuilder to retrieve.
      Returns:
      The OrderBuilder with the provided order ID, or null if no OrderBuilder can be found.
    • build

      public Strategy build()
      Deprecated.
      Materialises a Strategy object as configured by the StrategyBuilder.
      Returns:
      a new Strategy
      See Also:
    • build

      public Strategy build(boolean isSales)
      Deprecated.
      Materialises a Strategy object as configured by the StrategyBuilder, including sales fields if isSales is true.
      Returns:
      a new Strategy
      See Also:
    • getFixedFields

      public StrategyFieldSet getFixedFields()
      Deprecated.
      Returns the fields relating to the strategy that cannot be edited by the user
      Returns:
      The fixed fields.
    • getEditableFields

      public StrategyFieldSet getEditableFields()
      Deprecated.
      Returns the fields relating to the strategy that can be edited by the user.
      Returns:
      The editable fields.
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object