Singleton
caplin.trading.validation

TradingSystemAvailableValidator

Determines whether the trading system that will be used by a particular trade is down or not, and if so fails the validation for the transition. This provides fast failure feedback within GUIs that do not listen to the trading system status explicitly, and also provides a safety net for those GUIs that do listen to the status but the user has just managed to click to trade before the GUI updated.

Constructor Summary

Attributes Name and Description
caplin.trading.validation.TradingSystemAvailableValidator()

Constructs a new TradingSystemAvailableValidator.

Method Summary

Attributes Name and Description
<static> void validate(caplin.trading.trademodel.DataHolder oDataToValidate, caplin.trading.validation.ValidationResult oValidationResult)

Extracts the caplin.trading.trademodel.Trade from the __trade field within the specified data to validate.

Constructor Detail

caplin.trading.validation.TradingSystemAvailableValidator()

Constructs a new TradingSystemAvailableValidator.

Method Detail

<static> void validate(caplin.trading.trademodel.DataHolder oDataToValidate, caplin.trading.validation.ValidationResult oValidationResult)

Extracts the caplin.trading.trademodel.Trade from the __trade field within the specified data to validate. If the trading status for the Trade is caplin.trading.trademodel.TradingStatus#UNAVAILABLE, a message will be logged and an error added to the specified ValidationResult.

Parameters
caplin.trading.trademodel.DataHolder oDataToValidate The data to validate. Must not be null or undefined.
caplin.trading.validation.ValidationResult oValidationResult The caplin.trading.validation.ValidationResult which a failure message will be added to. Must not be null or undefined.