Class RequiredTradeFieldsValidator
- java.lang.Object
-
- com.caplin.motif.fx.trading.validator.RequiredTradeFieldsValidator
-
- All Implemented Interfaces:
TradeValidator
public class RequiredTradeFieldsValidator extends Object implements TradeValidator
-
-
Constructor Summary
Constructors Constructor Description RequiredTradeFieldsValidator(String... fieldNames)
RequiredTradeFieldsValidator(Set<String> fieldNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExpectedFieldValues(String fieldName, List<String> expectedFieldValues)
void
validate(com.caplin.trading.Trade trade)
Checks the validity of a Trade .
-
-
-
Method Detail
-
addExpectedFieldValues
public void addExpectedFieldValues(String fieldName, List<String> expectedFieldValues)
-
validate
public void validate(com.caplin.trading.Trade trade) throws ValidationException
Description copied from interface:TradeValidator
Checks the validity of a Trade . This method should throw anValidationException
if the trade is not valid.- Specified by:
validate
in interfaceTradeValidator
- Parameters:
trade
- The trade to be validated- Throws:
ValidationException
- If there was a problem validating the trade.
-
-