Class ActivationDate
- java.lang.Object
-
- com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
-
- com.caplin.motif.fx.trading.orders.submission.ActivationDate
-
@Deprecated public class ActivationDate extends OrderValidityDate
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
Fields Modifier and Type Field Description static ActivationDate
GFA
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
Constructors Constructor Description ActivationDate(String date, String time, String location, String offset)
Deprecated.Constructs an ActivationDate which represents a specific date, time and location.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
Deprecated.String
getDateFieldValue()
Deprecated.int
hashCode()
Deprecated.boolean
isGoodForActivation()
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.String
toString()
Deprecated.-
Methods inherited from class com.caplin.motif.fx.trading.orders.submission.OrderValidityDate
getDateAsString, getDateTime, getLocation, getOffset, getTimeAsString, isLocal, parse
-
-
-
-
Field Detail
-
GFA
public static final ActivationDate 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 Detail
-
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 Detail
-
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
public String getDateFieldValue()
Deprecated.
-
equals
public boolean equals(Object o)
Deprecated.- Overrides:
equals
in classOrderValidityDate
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classOrderValidityDate
-
toString
public String toString()
Deprecated.- Overrides:
toString
in classOrderValidityDate
-
-