Caplin Trader 4.7.1

Class: module:caplin/trading/restoration/TradeRestoreEvent

module:caplin/trading/restoration/TradeRestoreEvent

Constructor

new module:caplin/trading/restoration/TradeRestoreEvent(oTrade, sPreviousState, sRestoreState, mPreviousFieldData, mRestoredFieldData)

An event which is fired before and after a trade is restored.
Parameters:
Name Type Description
oTrade module:caplin/trading/trademodel/Trade The trade that was restored.
sPreviousState String The state that the trade was in before restoring.
sRestoreState String The state that the trade is restoring to.
mPreviousFieldData Map The data of the trade before the trade was restored.
mRestoredFieldData Map The data of the trade after the trade was restored.
See:

Methods

getPreviousFieldData() → {Map}

Returns the data of the trade prior to being restored. This includes previous leg data (prefixed with 'L<legId>_' eg 'L1_').
Returns:
The previous trade data.
Type
Map

getPreviousState() → {String}

Returns the previous state that the trade was in.
See:
Returns:
The previous state.
Type
String

getRestoredFieldData() → {Map}

Returns the data that the trade will be restored with.
Returns:
The restored trade data.
Type
Map

getRestoreState() → {String}

Returns the state that the trade is restoring into.
See:
Returns:
The state the trade is restoring into.
Type
String

getTrade() → {module:caplin/trading/trademodel/Trade}

Returns the trade that is being restored. This may be null if this is a module:caplin/trading/restoration/TradeRestoredListener#beforeTradeRestored event and the trade currently does not exist on the client.
Returns:
The restored trade.
Type
module:caplin/trading/trademodel/Trade