Class
caplin.trading.validation

PermissionValidator

The PermissionValidator is a caplin.trading.validation.Validator that is used during a trade to determine whether the user is permissioned to do a trade or not.
This class is immutable.

Constructor Summary

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

The constructor for the PermissionValidator.

Method Summary

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

Checks with the registered caplin.services.security.PermissionService singleton whether the current user has the correct permissions to trade.

Constructor Detail

caplin.trading.validation.PermissionValidator()

The constructor for the PermissionValidator.

Method Detail

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

Checks with the registered caplin.services.security.PermissionService singleton whether the current user has the correct permissions to trade.

Parameters
caplin.trading.trademodel.DataHolder oDataToValidate is trading data supplied by the trade such as the instrument, the trading protocol and the asset class. Must not be null or undefined.
caplin.trading.validation.ValidationResult oValidationResult The object used to report permission failure. Must not be null or undefined.