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:
OrderBuilder
,Order
-
-
Constructor Summary
Constructors Constructor Description StrategyBuilder()
Deprecated.Creates a new StrategyBuilder.StrategyBuilder(Strategy previousStrategy)
Deprecated.Creates a new StrategyBuilder with previous fieldSets.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description OrderBuilder
addOrderBuilder(int legID)
Deprecated.Adds anOrderBuilder
to this instance of StrategyBuilder with the specified leg ID.OrderBuilder
addOrderBuilder(int legID, Order previousOrder)
Deprecated.Adds anOrderBuilder
to this instance of StrategyBuilder with the specified leg ID and previous field set.Strategy
build()
Deprecated.Materialises a Strategy object as configured by the StrategyBuilder.Strategy
build(boolean isSales)
Deprecated.Materialises a Strategy object as configured by the StrategyBuilder, including sales fields if isSales is true.StrategyFieldSet
getEditableFields()
Deprecated.Returns the fields relating to the strategy that can be edited by the user.StrategyFieldSet
getFixedFields()
Deprecated.Returns the fields relating to the strategy that cannot be edited by the userOrderBuilder
getOrderBuilder(int legID)
Deprecated.Gets anOrderBuilder
with the specified leg ID.OrderBuilder
getOrderBuilder(String orderID)
Deprecated.Gets anOrderBuilder
with the specified order ID.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
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 Detail
-
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 callbuild()
.- 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 callbuild()
.- 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 anOrderBuilder
with the specified leg ID. The OrderBuilder must have been previously registered by callingaddOrderBuilder(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 anOrderBuilder
with the specified order ID. The OrderBuilder must have been previously registered by callingaddOrderBuilder(int)
and the order ID must have been set by callingOrderBuilder.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:
Strategy
-
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:
Strategy
-
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.
-
-