public class ActivationDate extends OrderValidityDate
The Date an order should be activated. This can be a recognised string from a backend trading system just as GFA (Good for Activation immediately) or can be a date and time with a location or UTC offset.
Modifier and Type | Field and Description |
---|---|
static ActivationDate |
GFA
An instance of ActivationDate that represents Good for Activation
immediately.
|
DATE_PATTERN, dateStr, datetime, isLocal, LOCAL, location, offset, timeStr, ZEROED_OFFSET
Constructor and Description |
---|
ActivationDate(String date,
String time,
String location,
String offset)
Constructs an ActivationDate which represents a specific date, time and location.
|
Modifier and Type | Method and Description |
---|---|
String |
getDateFieldValue() |
boolean |
isGoodForActivation()
Returns a boolean to show whether or not the Activation Date is Good
For Activation immediately.
|
static ActivationDate |
parseFromValues(String date,
String time,
String location,
String offset) |
String |
toString() |
equals, getDateAsString, getDateTime, getLocation, getOffset, getTimeAsString, hashCode, isLocal, parse
public static final ActivationDate GFA
ActivationDate()
.public ActivationDate(String date, String time, String location, String offset) throws OrderConfigurationException
Constructs an ActivationDate which represents a specific date, time and location. If
you want your order to be activated immediately rather than at a future time, you can use the
static instance GFA
instead of creating an instance with this constructor.
date
- The date as string in the format "YYYYMMDD".time
- The time as string in the format "HH:MM:SS".location
- The location pertaining to the date and time the order should be activated. This can either
be an entry in the tz database such as "Europe/London", or the string "LOCAL" (OrderValidityDate.LOCAL
).offset
- The UTC offset if the location was specified as "LOCAL", i.e local to the user. If a specific location is provided
then this value must be null, because the offset can be inferred from the date, time and location.OrderConfigurationException
- If any of the criteria specified by OrderValidityDate.parse(String, String, String, String)
are not met.
In particular, make sure you only provide a location or an offset, but not both. One of those two parameters must be null, or an
exception will be thrown.public static ActivationDate parseFromValues(String date, String time, String location, String offset) throws OrderConfigurationException
OrderConfigurationException
public boolean isGoodForActivation()
public String getDateFieldValue()
public String toString()
toString
in class OrderValidityDate
Copyright © 2015 Caplin Systems.