com.ibm.commerce.marketing.promotion.schedule

Class WeekDaySchedule

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.schedule.WeekDaySchedule
  • All Implemented Interfaces:
    Schedule, ScheduleLookAheadSupport, XMLizable, java.io.Serializable


    public class WeekDaySchedule
    extends java.lang.Object
    implements Schedule, ScheduleLookAheadSupport
    This class is used to define the days of the week that the promotion is in active state.

    XML Snippet for WeekDaySchedule:

      <Week impl= "com.ibm.commerce.marketing.promotion.schedule.WeekDaySchedule">
                    <WeekDay>Sunday</WeekDay>
                    <WeekDay>Monday</WeekDay>
                    <WeekDay>Tuesday</WeekDay>
                    <WeekDay>Wednesday</WeekDay>
                    <WeekDay>Thursday</WeekDay>
                    <WeekDay>Friday</WeekDay>
                    <WeekDay>Saturday</WeekDay>
       </Week>
     
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright
        See Also:
        Constant Field Values
    • Constructor Detail

      • WeekDaySchedule

        public WeekDaySchedule()
        Default constructor
      • WeekDaySchedule

        public WeekDaySchedule(int[] activeWeekDays)
        Constructor
        Parameters:
        activeWeekDays - days of the week, in which the schedule is active
    • Method Detail

      • isActive

        public boolean isActive()
        Description copied from interface: Schedule
        Checks to see if a schedule is active or not
        Specified by:
        isActive in interface Schedule
        Returns:
        true if the schedule is active, false otherwise
        See Also:
        com.ibm.commerce.discount.mixmatch.Schedule#isActive()
      • isActiveAsOf

        public boolean isActiveAsOf(java.util.Date theTime)
        Description copied from interface: Schedule
        Checks to see if a schedule is active at a certain time
        Specified by:
        isActiveAsOf in interface Schedule
        Parameters:
        theTime - the "certain time"
        Returns:
        true, if the schedule is active at that time, false otherwise
        See Also:
        com.ibm.commerce.discount.mixmatch.Schedule#isActiveAsOf(Date)
      • clockResolution

        public int clockResolution()
        Returns the constant for time resolution unit "Day"
        Specified by:
        clockResolution in interface ScheduleLookAheadSupport
        Returns:
        clock resolution in form of integer
      • currentState

        public boolean currentState()
        Returns the current schedule state
        Specified by:
        currentState in interface ScheduleLookAheadSupport
        Returns:
        current schedule state
      • getOverallStartDate

        public java.util.Date getOverallStartDate()
        Returns the overall start date, always return Schedule.START_OF_TIME
        Specified by:
        getOverallStartDate in interface Schedule
        Returns:
        overall start date
      • getOverallEndDate

        public java.util.Date getOverallEndDate()
        Returns the overall end date, always return Schedule.END_OF_TIME
        Specified by:
        getOverallEndDate in interface Schedule
        Returns:
        overall end date
      • getWeekDays

        public boolean[] getWeekDays()
        Returns the weekDays represented by an array of boolean
        Returns:
        the weekDays represented by an array of boolean