public class TimeRangeWithinADaySchedule extends TimeRangeSchedule
TimeRangeSchedule
class and defines a
time range within a day that the promotion is active.
XML Snippet for TimeRangeWithinADaySchedule:
<TimeWithinADay impl="com.ibm.commerce.marketing.promotion.schedule.TimeRangeWithinADaySchedule"> <Start inclusive="true">00:00:00</Start> <End inclusive="false">23:59:59</End> </TimeWithinADay>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright
|
INCLUDE_END, INCLUDE_START
ALL_WEEK_LONG, END_OF_THE_DAY, END_OF_TIME, START_OF_THE_DAY, START_OF_TIME
DAY, HALF_AN_HOUR, HOUR, MINUTE, MONTH, QUARTER, SECOND, WEEK, YEAR
Constructor and Description |
---|
TimeRangeWithinADaySchedule()
Default constructor
|
TimeRangeWithinADaySchedule(java.util.Date aStartTime,
java.util.Date anEndTime)
Constructor
|
TimeRangeWithinADaySchedule(java.util.Date aStartTime,
java.util.Date anEndTime,
boolean anIncludeStart,
boolean anIncludeEnd)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
fromXML(org.w3c.dom.Node node)
Transforms the XML node into its corresponding real Object.
|
java.util.Date |
getOverallEndDate()
Returns the overall end date, always return Schedule.END_OF_TIME
|
java.util.Date |
getOverallStartDate()
Returns the overall start date, always return Schedule.START_OF_TIME
|
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
|
java.lang.String |
toXML()
Converts the object into its corresponding XML format representation.
|
calculateNextStateAndExpirationTime, clockResolution, convertPromotionDatesToUTC, currentState, currentStateValidUntil, formatStringIntoDate, getEndTime, getStartTime, isIncludeEnd, isIncludeStart, setEndTime, setIncludeEnd, setIncludeStart, setStartTime
public static final java.lang.String COPYRIGHT
public TimeRangeWithinADaySchedule()
public TimeRangeWithinADaySchedule(java.util.Date aStartTime, java.util.Date anEndTime)
aStartTime
- start time, inclusiveanEndTime
- end time, inclusivepublic TimeRangeWithinADaySchedule(java.util.Date aStartTime, java.util.Date anEndTime, boolean anIncludeStart, boolean anIncludeEnd)
aStartTime
- start timeanEndTime
- end timeanIncludeStart
- whether start time is included in the active period of the
scheduleanIncludeEnd
- whether end time is included in the active period of the
schedulepublic boolean isActive()
Schedule
isActive
in interface Schedule
isActive
in class TimeRangeSchedule
com.ibm.commerce.discount.mixmatch.Schedule#isActive()
public boolean isActiveAsOf(java.util.Date theTime)
Schedule
isActiveAsOf
in interface Schedule
isActiveAsOf
in class TimeRangeSchedule
theTime
- the "certain time"com.ibm.commerce.discount.mixmatch.Schedule#isActiveAsOf(Date)
public void fromXML(org.w3c.dom.Node node) throws DeXMLizationException
XMLizable
fromXML
in interface XMLizable
fromXML
in class TimeRangeSchedule
node
- The node that represents an XMLizable objectDeXMLizationException
- when this process failsXMLizable.fromXML(Node)
public java.lang.String toXML() throws XMLizationException
XMLizable
toXML
in interface XMLizable
toXML
in class TimeRangeSchedule
XMLizationException
- when this process failsXMLizable.toXML()
public java.util.Date getOverallStartDate()
getOverallStartDate
in interface Schedule
getOverallStartDate
in class TimeRangeSchedule
public java.util.Date getOverallEndDate()
getOverallEndDate
in interface Schedule
getOverallEndDate
in class TimeRangeSchedule