public class SimpleScheduleEvaluateCmdImpl extends TaskCommandImpl implements ScheduleEvaluateCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright field.
|
Constructor and Description |
---|
SimpleScheduleEvaluateCmdImpl()
Default constructor for the class.
|
Modifier and Type | Method and Description |
---|---|
void | computeFullSchedule()
This method computes the complete schedule information using the schedule information provided through ScheduleInfoType that was set using setScheduleToEvaluate method.
|
void | computeNextOccurrence()
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.
|
protected int | getCalendarFieldForUnit(java.lang.String unitOfMeasure)
This method returns the calendar field for the specified unit of measure.
|
protected CommerceFoundationFactory | getCommerceFoundationFactory()
Returns an instance of the commerce foundation factory.
|
protected com.ibm.commerce.subscription.facade.datatypes.SubscriptionFactory | getSubscriptionFactory()
Returns an instance of the subscription factory.
|
protected ScheduleEvaluateCmd.UnitOfMeasure | getUnitOfMeasure(java.lang.String unit)
This method returns the UnitOfMeasure instance for the unit specified.
|
boolean | isScheduleEnded()
This method indicates if the schedule has ended.
|
protected boolean | isSupportedUnitOfMeasure(java.lang.String unitOfMeasure)
The method indicates if the unit of measure specified is supported or not.
|
java.util.Date | nextOccurrence()
This method returns the next occurrence of the schedule from the current date.
|
void | performExecute()
Based on the value returned by the getEvaluateMode method, this method invokes the computeFullSchedule method to compute the schedule information or the computeNextOccurrence method to compute the details of the next occurrence.
|
void | setComputeFullSchedule()
This method sets the evaluation mode of the command to compute the full schedule.
|
void | setComputeNextOccurenceFromSchedule()
This method sets the evaluation mode of the command to compute the next occurrence of the schedule.
|
void | setPreviousOccurrence(java.util.Date previousOccurrence)
This method sets the previous occurrence of the schedule for the command to calculate its next occurrence.
|
void | setScheduleToEvaluate(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType scheduleInfo)
Sets the schedule to be evaluated.
|
void | validateParameters()
This method checks if the schedule information is provided and calls the validate schedule method.
|
void | validateSchedule()
This method validates if the schedule information provided is sufficient to evaluate it.
|
public static final java.lang.String COPYRIGHT
public SimpleScheduleEvaluateCmdImpl()
public void computeFullSchedule() throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
protected int getCalendarFieldForUnit(java.lang.String unitOfMeasure)
public java.util.Date nextOccurrence()
public void setScheduleToEvaluate(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType scheduleInfo)
public void validateSchedule() throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException
public void validateParameters() throws ECException
public void performExecute() throws ECException
protected CommerceFoundationFactory getCommerceFoundationFactory()
protected com.ibm.commerce.subscription.facade.datatypes.SubscriptionFactory getSubscriptionFactory()
public boolean isScheduleEnded()
public void setComputeFullSchedule()
public void setComputeNextOccurenceFromSchedule()
public void setPreviousOccurrence(java.util.Date previousOccurrence)
protected boolean isSupportedUnitOfMeasure(java.lang.String unitOfMeasure)
protected ScheduleEvaluateCmd.UnitOfMeasure getUnitOfMeasure(java.lang.String unit)
public void computeNextOccurrence() throws com.ibm.commerce.foundation.internal.common.exception.FoundationApplicationException