Class ActivationDate
java.lang.Object
com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
com.caplin.motif.fx.trading.orders.submission.ActivationDate
Deprecated.
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.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ActivationDate
Deprecated.An instance of ActivationDate that represents Good for Activation immediately.Fields inherited from class com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
DATE_PATTERN, dateStr, datetime, isLocal, LOCAL, location, offset, timeStr, ZEROED_OFFSET
-
Constructor Summary
ConstructorDescriptionActivationDate
(String date, String time, String location, String offset) Deprecated.Constructs an ActivationDate which represents a specific date, time and location. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Deprecated.int
hashCode()
Deprecated.boolean
Deprecated.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) Deprecated.toString()
Deprecated.Methods inherited from class com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
getDateAsString, getDateTime, getLocation, getOffset, getTimeAsString, isLocal, parse
-
Field Details
-
GFA
Deprecated.An instance of ActivationDate that represents Good for Activation immediately. Using this instance is equivalent to using an instance created with the constructorActivationDate()
.
-
-
Constructor Details
-
ActivationDate
public ActivationDate(String date, String time, String location, String offset) throws OrderConfigurationException Deprecated.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.- Parameters:
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.- Throws:
OrderConfigurationException
- If any of the criteria specified byOrderValidityDate.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.
-
-
Method Details
-
parseFromValues
public static ActivationDate parseFromValues(String date, String time, String location, String offset) throws OrderConfigurationException Deprecated.- Throws:
OrderConfigurationException
-
isGoodForActivation
public boolean isGoodForActivation()Deprecated.Returns a boolean to show whether or not the Activation Date is Good For Activation immediately.- Returns:
- a boolean representing whether or not the date is Good For Activation.
-
getDateFieldValue
Deprecated. -
equals
Deprecated.- Overrides:
equals
in classOrderValidityDate
-
hashCode
public int hashCode()Deprecated.- Overrides:
hashCode
in classOrderValidityDate
-
toString
Deprecated.- Overrides:
toString
in classOrderValidityDate
-