Class RequiredTradeFieldsValidator
- java.lang.Object
-
- com.caplin.motif.fx.trading.validator.RequiredTradeFieldsValidator
-
- All Implemented Interfaces:
TradeValidator
public class RequiredTradeFieldsValidator extends java.lang.Object implements TradeValidator
-
-
Constructor Summary
Constructors Constructor Description RequiredTradeFieldsValidator(java.lang.String... fieldNames)
RequiredTradeFieldsValidator(java.util.Set<java.lang.String> fieldNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExpectedFieldValues(java.lang.String fieldName, java.util.List<java.lang.String> expectedFieldValues)
void
validate(com.caplin.trading.Trade trade)
Checks the validity of a Trade .
-
-
-
Method Detail
-
addExpectedFieldValues
public void addExpectedFieldValues(java.lang.String fieldName, java.util.List<java.lang.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.
-
-