Class StrategyBuilder
java.lang.Object
com.caplin.motif.fx.trading.orders.details.StrategyBuilder
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 Summary
ConstructorDescriptionDeprecated.Creates a new StrategyBuilder.StrategyBuilder
(Strategy previousStrategy) Deprecated.Creates a new StrategyBuilder with previous fieldSets. -
Method Summary
Modifier and TypeMethodDescriptionaddOrderBuilder
(int legID) Deprecated.Adds anOrderBuilder
to this instance of StrategyBuilder with the specified leg ID.addOrderBuilder
(int legID, Order previousOrder) Deprecated.Adds anOrderBuilder
to this instance of StrategyBuilder with the specified leg ID and previous field set.build()
Deprecated.Materialises a Strategy object as configured by the StrategyBuilder.build
(boolean isSales) Deprecated.Materialises a Strategy object as configured by the StrategyBuilder, including sales fields if isSales is true.Deprecated.Returns the fields relating to the strategy that can be edited by the user.Deprecated.Returns the fields relating to the strategy that cannot be edited by the usergetOrderBuilder
(int legID) Deprecated.Gets anOrderBuilder
with the specified leg ID.getOrderBuilder
(String orderID) Deprecated.Gets anOrderBuilder
with the specified order ID.toString()
Deprecated.
-
Constructor Details
-
StrategyBuilder
public StrategyBuilder()Deprecated.Creates a new StrategyBuilder. -
StrategyBuilder
Deprecated.Creates a new StrategyBuilder with previous fieldSets.- Parameters:
previousStrategy
- Previous strategy.
-
-
Method Details
-
addOrderBuilder
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
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
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
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
Deprecated.Materialises a Strategy object as configured by the StrategyBuilder.- Returns:
- a new Strategy
- See Also:
-
build
Deprecated.Materialises a Strategy object as configured by the StrategyBuilder, including sales fields if isSales is true.- Returns:
- a new Strategy
- See Also:
-
getFixedFields
Deprecated.Returns the fields relating to the strategy that cannot be edited by the user- Returns:
- The fixed fields.
-
getEditableFields
Deprecated.Returns the fields relating to the strategy that can be edited by the user.- Returns:
- The editable fields.
-
toString
Deprecated.
-