com.ibm.commerce.subscription.commands

Interface ScheduleEvaluateCmd

  • All Superinterfaces:
    com.ibm.websphere.command.CacheableCommand, com.ibm.commerce.command.CacheableECCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, ECCommand, java.io.Serializable, com.ibm.websphere.command.TargetableCommand, TaskCommand
    All Known Implementing Classes:
    SimpleScheduleEvaluateCmdImpl


    public interface ScheduleEvaluateCmd
    extends TaskCommand
    The interface evaluates the schedule information specified. Based on the usage specified, the command can :

    The usage of this command is decided based on whether it is set to compute the entire schedule setComputeFullSchedule() or set to compute only the next occurrence setComputeNextOccurenceFromSchedule()

    • Method Detail

      • setScheduleToEvaluate

        void setScheduleToEvaluate(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType scheduleInfo)
        Sets the schedule information instance to evaluate.
        Parameters:
        scheduleInfo - The schedule information instance to evaluate.
      • computeFullSchedule

        void computeFullSchedule()
                          throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
        This method computes the complete schedule information using the schedule information provided through ScheduleInfoType that was set using setScheduleToEvaluate method. The method validates the information in the ScheduleInfoType and computes the total number of occurrences, duration or the end date related info based on the input values specified. It then saves the fully computed schedule information back into ScheduleInfoType.
        Throws:
        com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
      • computeNextOccurrence

        void computeNextOccurrence()
                            throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
        This method computes the next occurrence of the schedule using the previous occurrence info and the schedule information specified through the ScheduleInfoType that was set in the setScheduleToEvaluate method. It then saves the computed value back into ScheduleInfoType.
        Throws:
        com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
      • nextOccurrence

        java.util.Date nextOccurrence()
        This method returns the next occurrence using the schedule information specified.
        Returns:
        The next occurrence date.
      • validateSchedule

        void validateSchedule()
                       throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
        This method validates the schedule information provided. Use this method to check if the parameters required to compute the schedule is available or not.
        Throws:
        com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
      • setPreviousOccurrence

        void setPreviousOccurrence(java.util.Date previousOccurrence)
        This method sets the previous occurrence of the schedule. When the command is set to compute the next occurrence, this value is used along with the schedule information specified to compute the same.
        Parameters:
        previousOccurrence - The previous occurrence of the schedule.
      • isScheduleEnded

        boolean isScheduleEnded()
        This method evaluates the schedule provided and indicates if the schedule has ended.
        Returns:
        True, if the end date of the schedule is before current date. False, otherwise.
      • setComputeFullSchedule

        void setComputeFullSchedule()
        This method is used to indicate to the command that the full schedule needs to be computed.
      • setComputeNextOccurenceFromSchedule

        void setComputeNextOccurenceFromSchedule()
        This method is used to indicate to the command that only the next occurrence of the schedule needs to be computed based on its previous occurrence.