public class TimeRangeSchedule extends java.lang.Object implements Schedule, ScheduleLookAheadSupport
XML Snippet for TimeRangeSchedule:
<TimeRange impl="com.ibm.commerce.marketing.promotion.schedule.TimeRangeSchedule"> <Start inclusive="true">00:00:00</Start> <End inclusive="false">23:59:59</End> </TimeRange>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
static boolean | INCLUDE_END
Includes the end time
|
static boolean | INCLUDE_START
Includes start time
|
Constructor and Description |
---|
TimeRangeSchedule()
Default Constructor
|
TimeRangeSchedule(java.util.Date aStartTime, java.util.Date anEndTime)
Constructor
|
TimeRangeSchedule(java.util.Date aStartTime, java.util.Date anEndTime, boolean anIncludeStart, boolean anIncludeEnd)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void | calculateNextStateAndExpirationTime()
Calculates the next state shift time and the next state
|
int | clockResolution()
returns the clock resolution
|
static boolean | convertPromotionDatesToUTC()
Read the value of the flag "ConvertPromotionDatesToUTC" defined in the promotion component configuration file (wc-admin-component.xml) to determine if the promotion dates must be converted to or interpreted in UTC (Coordinated Universal Time).
|
boolean | currentState()
Returns the current schedule state
|
java.util.Date | currentStateValidUntil()
Returns the time to next state shift point
|
static java.util.Date | formatStringIntoDate(java.lang.String strFormat, java.lang.String value)
This method uses the SimpleDateFormat class to parse text from a string to produce a Date.
|
void | fromXML(org.w3c.dom.Node node)
Transforms the XML node into its corresponding real Object.
|
java.util.Date | getEndTime()
Returns the endTime.
|
java.util.Date | getOverallEndDate()
returns the overall end date, in this case whatever the value of endTime is, including the date portion
|
java.util.Date | getOverallStartDate()
Returns the overall start Date, in this case whatever the value of startTime is, including the date portion
|
java.util.Date | getStartTime()
Returns the startTime.
|
boolean | isActive()
Checks to see if a schedule is active or not
|
boolean | isActiveAsOf(java.util.Date theTime)
Checks to see if a schedule is active at a certain time
|
boolean | isIncludeEnd()
Returns if the end time is included.
|
boolean | isIncludeStart()
Returns if the start time is included.
|
void | setEndTime(java.util.Date anEndTime)
Sets the endTime.
|
void | setIncludeEnd(boolean anIncludeEnd)
Sets the includeEnd.
|
void | setIncludeStart(boolean anIncludeStart)
Sets the includeStart.
|
void | setStartTime(java.util.Date aStartTime)
Sets the startTime.
|
java.lang.String | toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public static final boolean INCLUDE_START
public static final boolean INCLUDE_END
public TimeRangeSchedule(java.util.Date aStartTime, java.util.Date anEndTime)
public TimeRangeSchedule()
public TimeRangeSchedule(java.util.Date aStartTime, java.util.Date anEndTime, boolean anIncludeStart, boolean anIncludeEnd)
public static java.util.Date formatStringIntoDate(java.lang.String strFormat, java.lang.String value) throws java.text.ParseException
public boolean isActive()
public boolean isActiveAsOf(java.util.Date theTime)
public void fromXML(org.w3c.dom.Node node) throws DeXMLizationException
public java.lang.String toXML() throws XMLizationException
public int clockResolution()
public boolean currentState()
public java.util.Date currentStateValidUntil()
public void calculateNextStateAndExpirationTime()
public java.util.Date getEndTime()
public boolean isIncludeEnd()
public boolean isIncludeStart()
public java.util.Date getStartTime()
public void setEndTime(java.util.Date anEndTime)
public void setIncludeEnd(boolean anIncludeEnd)
public void setIncludeStart(boolean anIncludeStart)
public void setStartTime(java.util.Date aStartTime)
public java.util.Date getOverallStartDate()
public java.util.Date getOverallEndDate()
public static boolean convertPromotionDatesToUTC()