|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.core.instruments.InstrumentFunctionHandler<I>
org.marketcetera.client.instruments.InstrumentValidationHandler<Option>
org.marketcetera.client.instruments.OptionValidationHandler
public class OptionValidationHandler
Validates option instruments.
The option expiry date is validated by validateExpiry(String).
| Field Summary |
|---|
| Fields inherited from class org.marketcetera.client.instruments.InstrumentValidationHandler |
|---|
SELECTOR |
| Constructor Summary | |
|---|---|
OptionValidationHandler()
Creates an instance. |
|
| Method Summary | |
|---|---|
void |
validate(Instrument instrument)
Validates the supplied instrument. |
static void |
validateExpiry(String inExpiry)
Validates expiry field of an instrument. |
static void |
validateExpiryDate(String inExpiry)
Validates that the date matches the expected pattern per validateExpiry(String) and is a correct date for the given
month, year and day/week combination. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OptionValidationHandler()
| Method Detail |
|---|
public void validate(Instrument instrument)
throws OrderValidationException
InstrumentValidationHandler
validate in class InstrumentValidationHandler<Option>instrument - the instrument
OrderValidationException - if the validation fails.
public static void validateExpiry(String inExpiry)
throws OrderValidationException
Verifies that the expiry field has either of the following formats
inExpiry - the expiry field of the option
OrderValidationException - if the expiry field failed validation.
public static void validateExpiryDate(String inExpiry)
throws OrderValidationException
validateExpiry(String) and is a correct date for the given
month, year and day/week combination.
Note that this method is only available for convenience for UI validation. This method is not invoked for validation when the client is sending orders.
inExpiry - the expiry field of the option
OrderValidationException - if the expiry field failed validation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||